first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / scripts / winders / exploder.sh
1 #!/bin/bash
2
3 parm=$1
4
5 #echo parm original is: $parm
6 # turn the form that is just two characters of /X into X:/.
7 parm2=$(echo $parm | sed -e 's/^\/\([a-zA-Z]\)$/\1:\//g')
8 #echo parm2 is $parm2
9 # turn the msys path form into an msdos style path for the drive letter.
10 parm3=$(echo $parm2 | sed -e 's/^\/\([a-zA-Z]\)\//\1:\//g')
11 #echo parm3 is $parm3
12 # rip off any slashes on the end, if they aren't too close to a colon.
13 parm4=$(echo $parm3 | sed -e 's/\([^:]\)\/*$/\1/g')
14 #echo parm4 is $parm4
15 # turn linux forward slashes into dos backward slashes.
16 parm5=$(echo $parm4 | sed -e 's/\//\\/g')
17 #echo "chewed parm5 is: $parm5"
18
19 $WINDIR/explorer "$parm5"
20