X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=1cb2a2e4007ea9c308d8e041696d6d60c97172ba;hb=b51411a29f1a751a09e69f5676afeea24a94ac83;hp=3a86546be0abcc7a9f1b00b6c4c7e9cb306791a7;hpb=80118cc1248b9569821aa245f900cf028a57f9f4;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 3a86546b..1cb2a2e4 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -157,13 +157,18 @@ if [ -z "$skip_all" ]; then } # switches from a /X/path form to an X:/ form. this also processes cygwin paths. - function msys_to_dos_path() { - # we always remove dos slashes in favor of forward slashes. - echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' + function unix_to_dos_path() { + # we usually remove dos slashes in favor of forward slashes. + if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then + # unless this flag is set, in which case we force dos slashes. + echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' + else + echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' + fi } # switches from an X:/ form to an /X/path form. - function dos_to_msys_path() { + function dos_to_unix_path() { # we always remove dos slashes in favor of forward slashes. echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/\1\/\2/' }