diff options
author | Carlos Falgueras García <cfalgueras@fluendo.com> | 2022-04-14 12:15:09 +0200 |
---|---|---|
committer | Carlos Falgueras García <cfalgueras@fluendo.com> | 2022-04-14 13:10:14 +0200 |
commit | 52a1c0fd37c86310de0775f6f7a80f94b295a8a1 (patch) | |
tree | 8f37e7a0b539a9bf66c8a7b18213e76abd460a3f /cerbero-uninstalled | |
parent | 5cb8a2ae8a839fa82f16341af8ba48aeac88377d (diff) |
cerbero-uninstalled: Allow Arch Linux to use ./cerbero-uninstalled
In Arch Linux the path `/usr/bin/pacman` exists and this led the script to
think it's been running in a Windows without the appropriate MSYS
environment. Use the bash OSTYPE env var to ensure we're in a msys OS
before do the MSYS checks.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/847>
Diffstat (limited to 'cerbero-uninstalled')
-rwxr-xr-x | cerbero-uninstalled | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/cerbero-uninstalled b/cerbero-uninstalled index d9de2701..ae5334ef 100755 --- a/cerbero-uninstalled +++ b/cerbero-uninstalled @@ -24,14 +24,16 @@ ARGS=$@ SCRIPTDIR="`dirname $0`" -if [ -f "/mingw/bin/mingw-get.exe" ]; then - MSYS_VERSION=1 -elif [ -f "/usr/bin/pacman" ]; then - MSYS_VERSION=2 - if [ "$MSYSTEM" != "UCRT64" ]; then - echo "MSYS2 must use the UCRT64 environment instead of $MSYSTEM. https://www.msys2.org/docs/environments/"; - exit 1; - fi +if [ "$OSTYPE" == "msys" ]; then + if [ -f "/mingw/bin/mingw-get.exe" ]; then + MSYS_VERSION=1 + elif [ -f "/usr/bin/pacman" ]; then + MSYS_VERSION=2 + if [ "$MSYSTEM" != "UCRT64" ]; then + echo "MSYS2 must use the UCRT64 environment instead of $MSYSTEM. https://www.msys2.org/docs/environments/"; + exit 1; + fi + fi fi case "$MSYS_VERSION" in |