-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathl1vm-build-win-wspace.sh
executable file
·46 lines (40 loc) · 1 KB
/
l1vm-build-win-wspace.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
#!/bin/bash
echo -n "building: " && echo $1
secondinclude=${PWD}
secondinclude+='/'
l1pre $1.l1com out.l1com ~/l1vm/include/ $secondinclude -wdeprecated -wspaces
RETVAL=$?
[ $RETVAL -ne 0 ] && echo "preprocessor build failed: " && echo $i && exit 1
l1com out $2 $3 $4 $5 $6 $7
l1asm out $2 $3 $4 $5 $6 $7
RETVAL=$?
[ $RETVAL -ne 0 ] && echo "build failed!" && exit 1
if [ "$2" = "-pack" ]; then
# remove .l1com from file name and replace it by .l1obj.bz2
outname=${1%.l1com}
outname="${outname}.l1obj.bz2"
cp out.l1obj.bz2 $outname
else
# remove .l1com from file name and replace it by .l1obj
outname=${1%.l1com}
outname="${outname}.l1obj"
cp out.l1obj $outname
fi
echo "copying files..."
# get .l1asm file
outname=""
outname=${1%.l1asm}
outname="${outname}.l1asm"
cp out.l1asm $outname
# get .l1dbg file
outname=""
outname=${1%.l1com}
outname="${outname}.l1dbg"
cp out.l1dbg $outname
# get .md markdown docu file
if test -e "out.md"; then
outname=""
outname=${1%.md}
outname="${outname}.md"
cp out.md $outname
fi