File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 22
33set -eu
44
5+ isDebugMode () {
6+ ! [ -z ${DEBUG-} ]
7+ }
8+
9+ if ! [ -z ${SHELL_DEBUG-} ]; then
10+ set -x
11+ fi
12+
513throwError () {
614 echo " \033[91m✗\033[0m $1 ." >&2
715 exit 1
@@ -11,6 +19,22 @@ logHappy() {
1119 echo " \033[32m✔\033[0m $1 "
1220}
1321
22+ checkDependency () {
23+ if ! [ -x " $( command -v $1 ) " ]; then
24+ throwError " Missing dependency: I could not find the executable '$1 '"
25+ elif isDebugMode; then
26+ logHappy " Found '$1 '"
27+ fi
28+ }
29+
30+ checkDependency " grep"
31+ checkDependency " head"
32+ checkDependency " mkdir"
33+ checkDependency " sed"
34+ checkDependency " tar"
35+ checkDependency " touch"
36+ checkDependency " wget"
37+
1438# Pick the Agda executable to analyse
1539# unless the caller has specified one
1640if [ -z ${AGDA_EXEC-} ]; then
You can’t perform that action at this time.
0 commit comments