-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdev
More file actions
executable file
·46 lines (37 loc) · 956 Bytes
/
Copy pathdev
File metadata and controls
executable file
·46 lines (37 loc) · 956 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
#!/bin/bash
# To view the license please visit https://github.com/IDNI/parser/blob/main/LICENSE.md
echo "dev - Tau Parser development helper scripts"
help() {
echo "Usage: ./dev <SCRIPT> [SCRIPT_OPTIONS...]"
echo ""
echo " -D options may appear anywhere; see scripts/README.md"
echo " TAU_BUILD_JOBS: -D, env, or auto (half of CPU cores)"
echo ""
echo "Available scripts:"
for script in scripts/*.sh; do
if [ -f "$script" ]; then
echo -e "\t$(basename "$script" .sh)"
fi
done
echo "For more information, see scripts/README.md"
}
error() {
echo -e "\nError: $1\n"
help
exit 1
}
# Check if first argument is provided
if [ $# -eq 0 ]; then
error "No script name provided"
fi
script_name="$1"
if [ "$script_name" == "help" ] || [ "$script_name" == "--help" ] || [ "$script_name" == "-h" ]; then
help
exit 0
fi
source scripts/devrc
if resolve_script "$@"; then
exit 0
else
error "'scripts/${script_name%.sh}.sh' not found"
fi