-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·47 lines (43 loc) · 907 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·47 lines (43 loc) · 907 Bytes
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
#!/usr/bin/env bash
set -e
# Default configs
TARGET="all"
DEBUG=0
GENERATE_LST=0
# Parse args
while [[ $# -gt 0 ]]; do
case "$1" in
build)
TARGET="all"
shift
;;
clean)
TARGET="clean"
shift
;;
erase)
TARGET="erase"
shift
;;
debug)
DEBUG=1
shift
;;
lst)
GENERATE_LST=1
shift
;;
*)
EXTRA_ARGS+=("$1")
shift
;;
esac
done
# Debug: show build configuration
echo "================================"
echo " Target : $TARGET"
echo " Debug : $DEBUG"
echo " GENERATE_LST : $GENERATE_LST"
echo "================================"
# Call make
make $TARGET DEBUG=$DEBUG GENERATE_LST=$GENERATE_LST "${EXTRA_ARGS[@]}"