diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2017-09-27 19:50:02 +0200 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2017-09-27 19:50:02 +0200 |
commit | 0a1831644016e19bdd2a01d203d3881e572e0fd5 (patch) | |
tree | 96e8790c406f2ffa29386bdf6b2b3e57c359b2b7 /etc | |
parent | d5c32dade8b783c0bf1e90fea2624108634be038 (diff) | |
download | midipix_build-0a1831644016e19bdd2a01d203d3881e572e0fd5.tar.bz2 midipix_build-0a1831644016e19bdd2a01d203d3881e572e0fd5.tar.xz |
etc/midipix.sh: match /bin in ${PATH} w/ case/esac (via _mik.)
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/midipix.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/midipix.sh b/etc/midipix.sh index 78ebca91..9cd5684c 100755 --- a/etc/midipix.sh +++ b/etc/midipix.sh @@ -1,8 +1,9 @@ #!/bin/sh -f # Prepend /bin to ${PATH} if it does not contain it. -if [ -z "${PATH##/bin:*}" -a -z "${PATH##*:/bin:*}" -a -z "${PATH##*:/bin}" ]; then - export PATH="/bin${PATH:+:${PATH}}"; -fi; +case "${PATH}" in +/bin:*|*:/bin:*|*:/bin) ;; +*) export PATH="/bin${PATH:+:${PATH}}"; ;; +esac; # # Process -h/${#} > 1. Set and cd into ${MIDIPIX_PATH} from either |