diff options
Diffstat (limited to 'libalpine.sh.in')
-rw-r--r-- | libalpine.sh.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libalpine.sh.in b/libalpine.sh.in index 7aec815..6c6cc4e 100644 --- a/libalpine.sh.in +++ b/libalpine.sh.in @@ -4,6 +4,10 @@ PREFIX=@PREFIX@ PROGRAM=`basename $0` +: ${ROOT:=/} +[ "${ROOT}" = "${ROOT%/}" ] && ROOT="${ROOT}/" +[ "${ROOT}" = "${ROOT#/}" ] && ROOT="${PWD}/${ROOT}" + echon () { if [ X"$ECHON" = X ]; then # Determine how to "echo" without newline: "echo -n" |