make-macosx-app.sh using single '=' comparisons

This commit is contained in:
jeremiah sypult 2013-07-18 00:28:17 -05:00
parent 0d2a576a43
commit 2357f595fb

View file

@ -5,9 +5,9 @@
# if used, it we will store the .app bundle in the target arch build directory # if used, it we will store the .app bundle in the target arch build directory
# TODO: check for 1 or two parameters # TODO: check for 1 or two parameters
#if [ $# == 0 ] || [ $# -gt 2 ]; then #if [ $# = 0 ] || [ $# -gt 2 ]; then
if [ "$1" == "" ]; then if [ "$1" = "" ]; then
echo "Usage: $0 target <arch>" echo "Usage: $0 target <arch>"
echo "Example: $0 release x86" echo "Example: $0 release x86"
echo "Valid targets are:" echo "Valid targets are:"
@ -22,9 +22,9 @@ if [ "$1" == "" ]; then
exit 1 exit 1
fi fi
if [ "$1" == "release" ]; then if [ "$1" = "release" ]; then
TARGET_NAME="release" TARGET_NAME="release"
elif [ "$1" == "debug" ]; then elif [ "$1" = "debug" ]; then
TARGET_NAME="debug" TARGET_NAME="debug"
else else
echo "Invalid target: $1" echo "Invalid target: $1"
@ -37,11 +37,11 @@ fi
CURRENT_ARCH="" CURRENT_ARCH=""
if [ "$2" != "" ]; then if [ "$2" != "" ]; then
if [ "$2" == "x86" ]; then if [ "$2" = "x86" ]; then
CURRENT_ARCH="x86" CURRENT_ARCH="x86"
elif [ "$2" == "x86_64" ]; then elif [ "$2" = "x86_64" ]; then
CURRENT_ARCH="x86_64" CURRENT_ARCH="x86_64"
elif [ "$2" == "ppc" ]; then elif [ "$2" = "ppc" ]; then
CURRENT_ARCH="ppc" CURRENT_ARCH="ppc"
else else
echo "Invalid architecture: $1" echo "Invalid architecture: $1"
@ -78,7 +78,7 @@ function symlinkArch()
IS64=`file "${SRCFILE}.${EXT}" | grep "x86_64" | awk '{print $NF}'` IS64=`file "${SRCFILE}.${EXT}" | grep "x86_64" | awk '{print $NF}'`
ISPPC=`file "${SRCFILE}.${EXT}" | grep "ppc" | awk '{print $NF}'` ISPPC=`file "${SRCFILE}.${EXT}" | grep "ppc" | awk '{print $NF}'`
if [ "${IS32}" == "i386" ]; then if [ "${IS32}" = "i386" ]; then
if [ ! -L "${DSTFILE}x86.${EXT}" ]; then if [ ! -L "${DSTFILE}x86.${EXT}" ]; then
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86.${EXT}" ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86.${EXT}"
fi fi
@ -86,7 +86,7 @@ function symlinkArch()
rm "${DSTFILE}x86.${EXT}" rm "${DSTFILE}x86.${EXT}"
fi fi
if [ "${IS64}" == "x86_64" ]; then if [ "${IS64}" = "x86_64" ]; then
if [ ! -L "${DSTFILE}x86_64.${EXT}" ]; then if [ ! -L "${DSTFILE}x86_64.${EXT}" ]; then
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86_64.${EXT}" ln -s "${SRCFILE}.${EXT}" "${DSTFILE}x86_64.${EXT}"
fi fi
@ -94,7 +94,7 @@ function symlinkArch()
rm "${DSTFILE}x86_64.${EXT}" rm "${DSTFILE}x86_64.${EXT}"
fi fi
if [ "${ISPPC}" == "ppc" ]; then if [ "${ISPPC}" = "ppc" ]; then
if [ ! -L "${DSTFILE}ppc.${EXT}" ]; then if [ ! -L "${DSTFILE}ppc.${EXT}" ]; then
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}ppc.${EXT}" ln -s "${SRCFILE}.${EXT}" "${DSTFILE}ppc.${EXT}"
fi fi
@ -219,7 +219,7 @@ for ARCH in $SEARCH_ARCHS; do
fi fi
done done
if [ "${2}" == "" ]; then if [ "${2}" = "" ]; then
BUILT_PRODUCTS_DIR="${OBJROOT}" BUILT_PRODUCTS_DIR="${OBJROOT}"
else else
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-${CURRENT_ARCH}" BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-${CURRENT_ARCH}"
@ -234,7 +234,7 @@ fi
Q3_VERSION=`grep '^VERSION=' Makefile | sed -e 's/.*=\(.*\)/\1/'` Q3_VERSION=`grep '^VERSION=' Makefile | sed -e 's/.*=\(.*\)/\1/'`
if [ "${IOQ3_CLIENT_ARCHS}" == "" ]; then if [ "${IOQ3_CLIENT_ARCHS}" = "" ]; then
echo "$0: no ioquake3 binary architectures were found for target '${TARGET_NAME}'" echo "$0: no ioquake3 binary architectures were found for target '${TARGET_NAME}'"
exit 1 exit 1
else else