-
Notifications
You must be signed in to change notification settings - Fork 2
/
pushall.sh
executable file
·65 lines (58 loc) · 978 Bytes
/
pushall.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
58
59
60
61
62
63
64
65
#!/bin/zsh
set -e -u
. ./core/host/pushcommon.sh
pushsrc() {
dopushlua ctfws.lua
dopushlua ui-lcd-view.lua
dopushlua ui-lcd-ctrl.lua
dopushlua main.lua
dopushcompile init2.lua
}
if [ -n "${2:-}" ]; then
if [ -d conf/$2 ]; then CONFDIR=conf/$2
elif [ -d $2 ]; then CONFDIR=$2
else echo "Not a directory: $2"; exit 1
fi
fi
pushconf() {
if [ -z "${CONFDIR:-}" ]; then
echo "Asked to push config without specifying?"
exit 1
fi
for f in ${CONFDIR}/*; do
dopushtext "$f"
done
}
pushlfs() {
if [ -z ${LUACROSS:-} ]; then
./core/host/pushinit.sh
else
./mklfs.sh
dopushtext _lfs_build/luac.out
fi
}
case "${1:-}" in
all)
pushconf
pushsrc
pushlfs
;;
both)
pushconf
pushsrc
;;
src)
pushsrc
;;
srcmore)
pushsrc
pushlfs
;;
conf)
pushconf
;;
*)
echo "Please specify push mode: {conf,src,srcmore,both,all}"
exit 1
;;
esac