-
Notifications
You must be signed in to change notification settings - Fork 245
/
Copy pathcmdline.sh
58 lines (53 loc) · 1.31 KB
/
cmdline.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
#!/bin/sh
show_help() {
echo "Usage:"
echo " -h --help Show help"
echo " -v --version audiowaveform package version (e.g., 1.8.1)"
echo " -c --commit audiowaveform commit hash or tag name (e.g., 1.8.1)"
echo " -d --debian Debian release number (e.g., 8, 9, or 10)"
echo " -a --arch Architecture (e.g., amd64, x86_64, arm64, aarch64)"
}
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
show_help
exit 1
;;
-v|--version)
AUDIOWAVEFORM_PACKAGE_VERSION="$2"
shift
shift
;;
-c|--commit)
AUDIOWAVEFORM_VERSION="$2"
shift
shift
;;
-a|--arch)
ARCH="$2"
shift
shift
;;
-d|--debian)
DEBIAN_RELEASE="$2"
shift
shift
;;
-*|--*)
echo "Unknown option: $1"
exit 1
;;
esac
done
if [ -z "${AUDIOWAVEFORM_PACKAGE_VERSION}" ]
then
echo "Missing package version"
exit 1
fi
if [ -z "${AUDIOWAVEFORM_VERSION}" ]
then
echo "Missing git tag / commit"
exit 1
fi
echo "AUDIOWAVEFORM_PACKAGE_VERSION: ${AUDIOWAVEFORM_PACKAGE_VERSION}"
echo "AUDIOWAVEFORM_VERSION: ${AUDIOWAVEFORM_VERSION}"