Merge branch 'main' of feistymeow.org:feisty_meow
[feisty_meow.git] / scripts / files / exploder.sh
1 #!/bin/bash
2
3 parm=$1
4
5 #echo original parm is: $parm
6 # turn the form that is just two characters of /X into X:/.
7 parm=$(echo $parm | sed -e 's/^\/\([a-zA-Z]\)$/\1:\//g')
8 #echo parm now is $parm
9 # turn the msys path form into an msdos style path for the drive letter.
10 parm=$(echo $parm | sed -e 's/^\/\([a-zA-Z]\)\//\1:\//g')
11 #echo parm now is $parm
12 # turn the form that is /cygdrive/X into X:/.
13 parm=$(echo $parm | sed -e 's/^\/cygdrive\/\([a-zA-Z]\)$/\1:\//g')
14 #echo parm now is $parm
15 # turn regular cygwin paths into msdos style paths for the drive letter.
16 parm=$(echo $parm | sed -e 's/^\/cygdrive\/\([a-zA-Z]\)\//\1:\//g')
17 #echo parm now is $parm
18 # rip off any slashes on the end, if they aren't too close to a colon.
19 parm=$(echo $parm | sed -e 's/\([^:]\)\/*$/\1/g')
20 #echo parm now is $parm
21 # turn linux forward slashes into dos backward slashes.
22 parm=$(echo $parm | sed -e 's/\//\\/g')
23 #echo "totally chewed parm is: $parm"
24
25 $WINDIR/explorer "$parm"
26