-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·74 lines (65 loc) · 1.73 KB
/
update.sh
File metadata and controls
executable file
·74 lines (65 loc) · 1.73 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
if [ "$1" = "refresh" -o "$1" = "clean" ]
then
rm -rf cpu-assembler label-replacer macro-assembler asm-library cute-basic out-*
if [ "$1" = "clean" ]
then
exit 0
fi
fi
python -V > /dev/null 2>&1 || { echo "Please install Python before using this toolchain!"; exit 1; }
git --version > /dev/null 2>&1 || { echo "Please install Git before using this toolchain!"; exit 1; }
gcc --version > /dev/null 2>&1 || { echo "Please install GCC before using this toolchain!"; exit 1; }
make --version > /dev/null 2>&1 || { echo "Please install Make before using this toolchain!"; exit 1; }
if [ ! -d cpu-assembler ]
then
git clone git://github.com/nibble-knowledge/cpu-assembler || { echo "Could not retrieve low level assembler!"; exit 1; }
fi
if [ ! -d label-replacer ]
then
git clone git://github.com/nibble-knowledge/label-replacer || { echo "Could not retrieve label replacer!"; exit 1; }
fi
if [ ! -d macro-assembler ]
then
git clone git://github.com/nibble-knowledge/macro-assembler || { echo "Could not retrieve macro assembler!"; exit 1; }
fi
if [ ! -d asm-library ]
then
git clone git://github.com/nibble-knowledge/asm-library || { echo "Could not retrieve assembly library!"; exit 1; }
fi
if [ ! -d cute-basic ]
then
git clone git://github.com/nibble-knowledge/cute-basic || { echo "Could not retrieve Cute BASIC compiler!"; exit 1; }
fi
cd cpu-assembler
if [ ! -z "$(git fetch --dry-run)" ]
then
make clean
git pull
fi
make
cd ..
cd label-replacer
if [ ! -z "$(git fetch --dry-run)" ]
then
git pull
fi
cd ..
cd macro-assembler
if [ ! -z "$(git fetch --dry-run)" ]
then
git pull
fi
cd ..
cd asm-library
if [ ! -z "$(git fetch --dry-run)" ]
then
git pull
fi
cd ..
cd cute-basic
if [ ! -z "$(git fetch --dry-run)" ]
then
git pull
fi
cd ..