From 0a1831644016e19bdd2a01d203d3881e572e0fd5 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz Date: Sep 27 2017 17:50:02 +0000 Subject: etc/midipix.sh: match /bin in ${PATH} w/ case/esac (via _mik.) --- diff --git a/etc/midipix.sh b/etc/midipix.sh index 78ebca9..9cd5684 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