3 source $FEISTY_MEOW_SCRIPTS/core/functions.sh
5 function dossify_and_run_commands()
13 #all primordial gunk. try above first.
14 # we only mess with the command line on windows...
15 if [ "$OS" != "Windows_NT" ]; then
16 # for non windows, just run the commands straight up.
21 declare -a darc_commands=()
24 if [[ "$i" =~ ^-[a-zA-z][/\"].* ]]; then
26 filename="$(unix_to_dos_path ${i:2})"
27 #echo "first two chars are $flag"
28 #echo "last after that are $filename"
29 recombined="$flag$filename"
30 #echo combined flag and file is $recombined
31 darc_commands+=("$recombined")
33 darc_commands+=($(unix_to_dos_path $i))
37 declare -a real_commands=()
38 for i in "${darc_commands[@]}"; do
39 real_commands+=($(echo $i | sed -e 's/\\/\\\\/g'))
43 echo commands are now:
44 for i in "${real_commands[@]}"; do
50 # now actually run the chewed command.
51 cmd /c "${real_commands[@]}"
54 dossify_and_run_commands "$@"