fix shells that don't support [[ … ]] pattern matching (#492)

This commit is contained in:
Jeff Williams 2013-09-17 21:51:38 -07:00
parent 79487b786a
commit 7093310ac1

3
jsdoc
View File

@ -4,7 +4,8 @@
SOURCE="$0"
while [ -h "$SOURCE" ] ; do
NEXTSOURCE="$(readlink "$SOURCE")"
if [[ "$NEXTSOURCE" = /* ]]; then
echo $NEXTSOURCE | grep -q -e "^/"
if [ $? = 0 ]; then
SOURCE="$NEXTSOURCE"
else
SOURCE="$(dirname $SOURCE)/$NEXTSOURCE"