From: ds6 Date: Fri, 13 Apr 2018 03:11:06 +0000 (-0500) Subject: fix for shells without OSTYPE X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/74024535882f827ce22050175a7b337e036150b1?ds=inline;hp=72c6733b1903efabd902d8005b9a1e52934b9ea3 fix for shells without OSTYPE --- diff --git a/install.sh b/install.sh index 6e77291..3eeca8b 100755 --- a/install.sh +++ b/install.sh @@ -17,16 +17,16 @@ cd - # accomodate multiple userlands fex='-perm -ugo=x' +lnargs=-sfnv +if [ -z "$OSTYPE" ]; then + OSTYPE=`uname -o | tr '[:upper:]' '[:lower:]'` +fi case "$OSTYPE" in # TODO: make links safer for systems without -Fw freebsd*) lnargs=-sFhvw;; netbsd*|openbsd*) lnargs=-sfhv;; - *) lnargs=-sfnv - # android busybox find doesn't have -executable - # and its sh doesn't set OSTYPE :DD - if [ -z "$ANDROID_ROOT" ]; then - fex=-executable - fi;; + # android busybox find doesn't have -executable + android) fex=-executable;; esac l() {