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
19 filename="$(unix_to_dos_path ${i:2})"
20 #echo "first two chars are $flag"
21 #echo "last after that are $filename"
22 recombined="$flag$filename"
23 #echo combined flag and file is $recombined
24 darc_commands+=("$recombined")
26 darc_commands+=($(unix_to_dos_path $i))
30 declare -a real_commands=()
31 for i in "${darc_commands[@]}"; do
32 real_commands+=($(echo $i | sed -e 's/\\/\\\\/g'))
36 echo commands are now:
37 for i in "${real_commands[@]}"; do
43 # now actually run the chewed command.
44 cmd /c "${real_commands[@]}"
47 dossify_and_run_commands "$@"