From d758ca1028d995976351f9f1072ac34751928f30 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 02 Jul 2018 16:09:47 -0400 Subject: is_profile(): Replace [ command and prefix removal with case --- diff --git a/src/profile.sh b/src/profile.sh index e5a9240..05a25fe 100644 --- a/src/profile.sh +++ b/src/profile.sh @@ -34,7 +34,7 @@ is_profile() { local prof="${1}" - [ "x${profiles# ${prof} }" != "x${profiles}" ] + case "${profiles}" in *" ${prof} "*) return 0;; *) return 1;; esac return ${?} } -- cgit v0.9.1