From b3209e15fb479b051fc91910bfb127ec5995aaa4 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 16 Mar 2012 07:41:18 -0700 Subject: [PATCH] updated to make cygwin work also. --- scripts/winders/exploder.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/scripts/winders/exploder.sh b/scripts/winders/exploder.sh index 56594bdf..6199105d 100644 --- a/scripts/winders/exploder.sh +++ b/scripts/winders/exploder.sh @@ -2,19 +2,25 @@ parm=$1 -#echo parm original is: $parm +#echo original parm is: $parm # turn the form that is just two characters of /X into X:/. -parm2=$(echo $parm | sed -e 's/^\/\([a-zA-Z]\)$/\1:\//g') -#echo parm2 is $parm2 +parm=$(echo $parm | sed -e 's/^\/\([a-zA-Z]\)$/\1:\//g') +#echo parm now is $parm # turn the msys path form into an msdos style path for the drive letter. -parm3=$(echo $parm2 | sed -e 's/^\/\([a-zA-Z]\)\//\1:\//g') -#echo parm3 is $parm3 +parm=$(echo $parm | sed -e 's/^\/\([a-zA-Z]\)\//\1:\//g') +#echo parm now is $parm +# turn the form that is /cygdrive/X into X:/. +parm=$(echo $parm | sed -e 's/^\/cygdrive\/\([a-zA-Z]\)$/\1:\//g') +#echo parm now is $parm +# turn regular cygwin paths into msdos style paths for the drive letter. +parm=$(echo $parm | sed -e 's/^\/cygdrive\/\([a-zA-Z]\)\//\1:\//g') +#echo parm now is $parm # rip off any slashes on the end, if they aren't too close to a colon. -parm4=$(echo $parm3 | sed -e 's/\([^:]\)\/*$/\1/g') -#echo parm4 is $parm4 +parm=$(echo $parm | sed -e 's/\([^:]\)\/*$/\1/g') +#echo parm now is $parm # turn linux forward slashes into dos backward slashes. -parm5=$(echo $parm4 | sed -e 's/\//\\/g') -#echo "chewed parm5 is: $parm5" +parm=$(echo $parm | sed -e 's/\//\\/g') +#echo "totally chewed parm is: $parm" -$WINDIR/explorer "$parm5" +$WINDIR/explorer "$parm" -- 2.34.1