From: ng0 Date: Wed, 27 Nov 2019 21:55:31 +0000 (+0000) Subject: bootstrap: check for the shell builtin we use and exit if it doesn't X-Git-Tag: v0.12.0~67^2~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cf267b6ac1f0e10f90716a490cc4d1e60aea5de8;p=oweals%2Fgnunet.git bootstrap: check for the shell builtin we use and exit if it doesn't exist. --- diff --git a/bootstrap b/bootstrap index e2654d9bd..06a82ddfc 100755 --- a/bootstrap +++ b/bootstrap @@ -18,6 +18,17 @@ cleanup() rm -rf libltdl } +errmsg='' + +# Check if shell supports builtin 'type'. +if test -z "$errmsg"; then + if ! (eval 'type type') >/dev/null 2>&1 + then + errmsg='Shell does not support type builtin' + exit 1 + fi +fi + # This is more portable than `which' but comes with # the caveat of not(?) properly working on busybox's ash: existence()