-
Notifications
You must be signed in to change notification settings - Fork 21
/
generate-js-runtime.sh
executable file
·57 lines (48 loc) · 1.38 KB
/
generate-js-runtime.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
orig_dir=`pwd`
target_new=$orig_dir/war/js/mzscheme-vm/support-new.js
platform=browser
testing=false
echo 'Building support.js:';
pushd war-src/js/js-runtime/ > /dev/null
if [ -f $target_new ]; then
rm -f $target_new
fi
if [ -f $platform-platform.js ]; then
echo " Adding platform-specific code for $platform";
cat $platform-platform.js >> $target_new;
else
echo " Requires a platform (either \"browser\" or \"node\")"
exit -1
fi
echo ' Concatenating main source files';
# The for-loop below breaks on windows. Hard-coding fixes it.
#for i in $(cat order); do
# echo ' adding' $i;
# cat $i >> $target_new;
#done;
cat json2.js >> $target_new;
cat helpers.js >> $target_new;
cat json2.js >> $target_new;
cat helpers.js >> $target_new;
cat world/jsworld/jsworld.js >> $target_new;
cat js-numbers.js >> $target_new;
cat jshashtable.js >> $target_new;
cat types.js >> $target_new;
cat state.js >> $target_new;
cat md5.js >> $target_new;
cat world/world-config.js >> $target_new;
cat world/world-stimuli.js >> $target_new;
cat world/world.js >> $target_new;
cat world/jsworld.js >> $target_new;
cat primitive.js >> $target_new;
cat control.js >> $target_new;
cat loader.js >> $target_new;
cat interpret.js >> $target_new;
if [ "$testing" = true ]; then
echo ' Adding exports for testing'
cat exports.js >> $target_new;
fi
echo ' Done!'
popd > /dev/null
exit 0