Browse Source

cerbero-uninstalled: Fix running from cmd.exe

You can run cerbero from cmd.exe like so:

```
> C:\MinGW\msys\1.0\bin\sh.exe --login -c 'c:/path/to/cerbero-uninstalled [args]'
```

In this case, `dirname` returns a native-win32 path, not an MSYS unix
path. We should short-circuit and return that directly in that case.

PS: We cannot run cerbero directly from cmd.exe as a python script
because we need the MSYS environment for building Autotools recipes.
zrythm
Nirbheek Chauhan 3 years ago committed by GStreamer Merge Bot
parent
commit
12f59e3647
  1. 5
      cerbero-uninstalled

5
cerbero-uninstalled

@ -45,6 +45,11 @@ esac @@ -45,6 +45,11 @@ esac
msys_dir_to_win32() {
set -e
local msys_path stripped_path mount_point path mounted_path
# If the path is already a native path, just return that
if [[ $1 == ?':/'* ]] || [[ $1 == ?':\\'* ]]; then
echo $1
return
fi
# Convert /c or /mingw etc to /c/ or /mingw/ etc; gives us a necessary
# anchor to split the path into components
msys_path="$1/"

Loading…
Cancel
Save