diff options
author | ng0 <ng0@n0.is> | 2019-11-27 21:55:31 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-27 21:55:31 +0000 |
commit | cf267b6ac1f0e10f90716a490cc4d1e60aea5de8 (patch) | |
tree | 9975d9dee4e7a0e17159559ed79ecb4fb37b2a11 | |
parent | 74fbae9ea3b3f3a59ce611429fd66074cbccfa45 (diff) | |
download | gnunet-cf267b6ac1f0e10f90716a490cc4d1e60aea5de8.tar.gz gnunet-cf267b6ac1f0e10f90716a490cc4d1e60aea5de8.zip |
bootstrap: check for the shell builtin we use and exit if it doesn't
exist.
-rwxr-xr-x | bootstrap | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -18,6 +18,17 @@ cleanup() | |||
18 | rm -rf libltdl | 18 | rm -rf libltdl |
19 | } | 19 | } |
20 | 20 | ||
21 | errmsg='' | ||
22 | |||
23 | # Check if shell supports builtin 'type'. | ||
24 | if test -z "$errmsg"; then | ||
25 | if ! (eval 'type type') >/dev/null 2>&1 | ||
26 | then | ||
27 | errmsg='Shell does not support type builtin' | ||
28 | exit 1 | ||
29 | fi | ||
30 | fi | ||
31 | |||
21 | # This is more portable than `which' but comes with | 32 | # This is more portable than `which' but comes with |
22 | # the caveat of not(?) properly working on busybox's ash: | 33 | # the caveat of not(?) properly working on busybox's ash: |
23 | existence() | 34 | existence() |