Skip to content

Commit edb2ec6

Browse files
committed
Fix shell script
1 parent 048e89d commit edb2ec6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gen.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ rm -rf out/* build/*
66

77
prelude=$(effekt --show-prelude)
88

9+
# this complex json maneuver is required because .json files of same basename get overwritten by effekt!
910
for file in $(find effekt/libraries/ -type f -name "*.effekt"); do
11+
json=out/"$(basename "$file")".json
12+
if [ -f "$json" ]; then mv "$json" out/"$(basename "$file")"_.json; fi
1013
effekt -o out/ --write-documentation "$file"
11-
cat out/"$(basename $file)".json >>build/raw.json
1214
done
1315

14-
cat out/raw.json | jq -c -s . >build/full.json
16+
cat out/*.json | jq -c -s . >build/full.json
1517
gzip build/full.json
1618

1719
node convert.js "$1" "$prelude"
1820
node index.js "$1" "$prelude" >build/index."$1"
1921

20-
cp common.js static/* "$dir"
21-
2222
# we copy the static files into *every* subdirectory
2323
# this is a hack, but makes importing files a lot simpler!
2424
for dir in $(find build -type d); do

0 commit comments

Comments
 (0)