From 0a1831644016e19bdd2a01d203d3881e572e0fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Wed, 27 Sep 2017 19:50:02 +0200 Subject: etc/midipix.sh: match /bin in ${PATH} w/ case/esac (via _mik.) --- etc/midipix.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'etc') 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 -- cgit v1.2.3