3 source $FEISTY_MEOW_SCRIPTS/core/functions.sh
5 function dossify_and_run_commands()
7 # we only mess with the command line on windows...
8 if [ "$OS" != "Windows_NT" ]; then
9 # for non windows, just run the commands straight up.
14 declare -a darc_commands=()
17 if [[ "$i" =~ ^-[a-zA-z][/\"].* ]]; then
18 echo found parameter to fix...
20 filename="$(unix_to_dos_path ${i:2})"
21 echo "first two chars are $flag"
22 echo "last after that are $filename"
23 recombined="$flag$filename"
24 echo combined flag and file is $recombined
25 darc_commands+=("$recombined")
27 darc_commands+=($(unix_to_dos_path $i))
31 declare -a real_commands=()
32 for i in "${darc_commands[@]}"; do
33 real_commands+=($(echo $i | sed -e 's/\\/\\\\/g'))
37 echo commands are now: >>/tmp/wrapdoze.log
38 for i in "${real_commands[@]}"; do
39 echo $i >>/tmp/wrapdoze.log
43 # now actually run the chewed command.
44 cmd /c "${real_commands[@]}"
47 dossify_and_run_commands "$@"