Improve OS type detection when running install-share.sh during make install.

We need to also include e.g. "WindowsNT" and "CYGWIN_NT".
This commit is contained in:
Petr Zemek 2017-12-13 14:00:49 +01:00
parent b19112dc8d
commit e6491fccc9
2 changed files with 6 additions and 3 deletions

View File

@ -2,6 +2,7 @@
# dev
* Fix: Improve OS type detection when installing the decompiler.
* Fix: Remove useless OS type detection when running decompilations (#10).
# v3.0 (2017-12-13)

View File

@ -30,9 +30,11 @@ fi
# Get install path from script options.
INSTALL_PATH="$1"
# Convert from Windows to Unix path on Windows.
if [[ $(uname -s) == *MINGW* ]] || [[ $(uname -s) == *MSYS* ]]; then
INSTALL_PATH="$(sed -e 's/\\/\//g' -e 's/://' <<< "/$INSTALL_PATH")"
fi
case "$(uname -s)" in
*Windows*|*CYGWIN*|*MINGW*|*MSYS*)
INSTALL_PATH="$(sed -e 's/\\/\//g' -e 's/://' <<< "/$INSTALL_PATH")"
;;
esac
SHARE_DIR="$INSTALL_PATH/share"