Fixed OS check and POSIX sh compatibility

This commit is contained in:
PatTheMav 2018-10-24 15:12:54 +02:00
parent ef75ca36c9
commit 9df72f54d5
No known key found for this signature in database
GPG Key ID: F8BCC3052CE91D29
4 changed files with 25 additions and 14 deletions

View File

@ -1,7 +1,10 @@
#!/bin/sh
if [[ "${OSTYPE}" != "darwin"* ]]; then
OSTYPE=$(uname)
if [ "${OSTYPE}" != "Darwin" ]; then
echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
return 1
exit 1
fi
HAS_CMAKE=$(type cmake 2>/dev/null)
@ -9,7 +12,7 @@ HAS_GIT=$(type git 2>/dev/null)
if [[ "${HAS_CMAKE}" == "" ]]; then
echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
return 1
exit 1
fi
#export QT_PREFIX="$(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)"

View File

@ -1,20 +1,23 @@
#!/bin/sh
if [[ "${OSTYPE}" != "darwin"* ]]; then
OSTYPE=$(uname)
if [ "${OSTYPE}" != "Darwin" ]; then
echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
return 1
exit 1
fi
HAS_CMAKE=$(type cmake 2>/dev/null)
HAS_GIT=$(type git 2>/dev/null)
if [[ "${HAS_CMAKE}" == "" ]]; then
if [ "${HAS_CMAKE}" == "" ]; then
echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
return 1
exit 1
fi
if [[ "${HAS_GIT}" == "" ]]; then
if [ "${HAS_GIT}" == "" ]; then
echo "[obs-websocket - Error] Git not installed - please install Xcode developer tools or via Homebrew."
return 1
exit 1
fi
# Build obs-studio

View File

@ -1,14 +1,17 @@
#!/bin/sh
if [[ "${OSTYPE}" != "darwin"* ]]; then
OSTYPE=$(uname)
if [ "${OSTYPE}" != "Darwin" ]; then
echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
return 1
exit 1
fi
HAS_BREW=$(type brew 2>/dev/null)
if [[ "${HAS_BREW}" == "" ]]; then
echo "[obs-websocket - Error] Please install Homebrew (https://www.brew.sh/) to build obs-websocket on macOS."
return 1
exit 1
fi
# OBS Studio deps

View File

@ -2,9 +2,11 @@
set -e
if [[ "${OSTYPE}" != "darwin"* ]]; then
OSTYPE=$(uname)
if [ "${OSTYPE}" != "Darwin" ]; then
echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
return 1
exit 1
fi
echo "[obs-websocket] Preparing package build"