Fix a couple of bashisms in libretro-config.sh

This commit is contained in:
T. Joseph Carter 2015-02-02 06:19:21 -08:00
parent 3285c0162a
commit 2c6e9e1a31

View File

@ -1,33 +1,38 @@
#!/bin/bash #!/bin/bash
# vi: ts=3 sw=3 et
# Architecture Assignment # Architecture Assignment
[[ -z "$ARCH" ]] && ARCH="$(uname -m)" [ -z "${ARCH}" ] && ARCH="`uname -m`"
case "$ARCH" in case "${ARCH}" in
x86_64) x86_64)
X86=true && X86_64=true X86=true
X86_64=true
;;
i386|i686)
X86=true
;; ;;
i686) X86=true;;
armv*) armv*)
ARM=true && export FORMAT_COMPILER_TARGET=armv ARM=true
export FORMAT_COMPILER_TARGET=armv
export RARCHCFLAGS="${RARCHCFLAGS} -marm" export RARCHCFLAGS="${RARCHCFLAGS} -marm"
case "$ARCH" in case "${ARCH}" in
armv5tel) ARMV5=true;; armv5tel) ARMV5=true ;;
armv6l) ARMV6=true;; armv6l) ARMV6=true ;;
armv7l) ARMV7=true;; armv7l) ARMV7=true ;;
esac;; esac
;;
esac esac
if [ -n "${PROCESSOR_ARCHITEW6432}" -a "${PROCESSOR_ARCHITEW6432}" = "AMD64" ]; then
if [[ -n "$PROCESSOR_ARCHITEW6432" && $PROCESSOR_ARCHITEW6432 -eq "AMD64" ]]; then
ARCH=x86_64 ARCH=x86_64
X86=true && X86_64=true X86=true && X86_64=true
fi fi
if [ -z "$JOBS" ]; then if [ -z "$JOBS" ]; then
if command -v nproc >/dev/null; then if command -v nproc >/dev/null; then
JOBS=$(nproc) JOBS=`nproc`
else else
JOBS=1 JOBS=1
fi fi
fi fi
# Platform Assignment # Platform Assignment