From: Chris Koeritz Date: Fri, 2 Oct 2015 19:13:54 +0000 (-0400) Subject: mod from frumious on surya, hopefully to fix one more instance of path annoyance... X-Git-Tag: 2.140.90~586 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=3f1980f32048f80c31118be902901e9676ab826e;p=feisty_meow.git mod from frumious on surya, hopefully to fix one more instance of path annoyance from or for cygwin. --- diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 912f545a..8054705d 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -281,10 +281,12 @@ if [ -z "$skip_all" ]; then fi } - # switches from an X:/ form to an /X/path form. + # switches from an X:/ form to a /cygdrive/X/path form. this is only useful + # for the cygwin environment currently. 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/' +#old: echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/\1\/\2/' + echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/cygdrive\/\1\/\2/' } # returns a successful value (0) if this system is debian or ubuntu.