forked from Peefy/KCLVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·83 lines (79 loc) · 1.76 KB
/
run.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
# Environment
if [ -f "/etc/os-release" ]; then
source /etc/os-release
os=$ID
else
os=$(uname)
fi
topdir=$PWD
# Options
help_message=$(cat <<-END
Usage:
run.sh -h
Print this help message
run.sh -a [action]
Perform an action
run.sh
Perform an action interactively
Available actions:
build
Build everything
build-cpython
Configure and build CPython
build-kclvm
Package CPython and the KCLVM extension into KCLVM
update-kclvm
Quickly update KCLVM without packaging CPython and site-packages
test
Perform testing
release
Create a package for releasing
END
)
action=
while getopts "a:h:s:" opt; do
case $opt in
a)
action="$OPTARG"
;;
h)
echo "$help_message"
exit 1
;;
s)
sslpath="$OPTARG"
;;
\?) echo "Invalid option -$OPTARG"
;;
esac
done
if [ "$action" == "" ]; then
PS3='Please select the action: '
options=("build" "build-kclvm" "update-kclvm" "test" "release")
select action in "${options[@]}"
do
case $action in
"build")
break
;;
"build-kclvm")
break
;;
"update-kclvm")
break
;;
"test")
break
;;
"release")
break
;;
*) echo "Invalid action $REPLY:$action"
exit 1
break
;;
esac
done
fi
os=$os topdir=$topdir sslpath=$sslpath $topdir/internal/scripts/$action.sh