May as well do the shell quoting changes to other scripts

This commit is contained in:
T. Joseph Carter 2015-02-17 23:17:47 -08:00
parent 8c1539c3bb
commit b8c896e3ee
2 changed files with 24 additions and 28 deletions

View File

@ -2,9 +2,9 @@
# Architecture Assignment # Architecture Assignment
config_cpu() { config_cpu() {
[ -n "${2}" ] && ARCH=${1} [ -n "$2" ] && ARCH="$1"
[ -z "${ARCH}" ] && ARCH="`uname -m`" [ -z "$ARCH" ] && ARCH="$(uname -m)"
case "${ARCH}" in case "$ARCH" in
x86_64) x86_64)
X86=true X86=true
X86_64=true X86_64=true
@ -15,7 +15,7 @@ config_cpu() {
armv*) armv*)
ARM=true ARM=true
export FORMAT_COMPILER_TARGET=armv 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 ;;
@ -23,7 +23,7 @@ config_cpu() {
esac esac
;; ;;
esac esac
if [ -n "${PROCESSOR_ARCHITEW6432}" -a "${PROCESSOR_ARCHITEW6432}" = "AMD64" ]; then if [ -n "$PROCESSOR_ARCHITEW6432" -a "$PROCESSOR_ARCHITEW6432" = "AMD64" ]; then
ARCH=x86_64 ARCH=x86_64
X86=true && X86_64=true X86=true && X86_64=true
fi fi
@ -31,9 +31,9 @@ config_cpu() {
# Platform Assignment # Platform Assignment
config_platform() { config_platform() {
[ -n "${1}" ] && platform="${1}" [ -n "$1" ] && platform="$1"
[ -z "${platform}" ] && platform="`uname`" [ -z "$platform" ] && platform="$(uname)"
case "${platform}" in case "$platform" in
*BSD*) *BSD*)
FORMAT_EXT="so" FORMAT_EXT="so"
FORMAT_COMPILER_TARGET="unix" FORMAT_COMPILER_TARGET="unix"
@ -84,27 +84,23 @@ config_platform() {
} }
config_log_build_host() { config_log_build_host() {
echo "PLATFORM: ${platform}" echo "PLATFORM: $platform"
echo "ARCHITECTURE: ${ARCH}" echo "ARCHITECTURE: $ARCH"
echo "TARGET: ${FORMAT_COMPILER_TARGET}" echo "TARGET: $FORMAT_COMPILER_TARGET"
} }
config_cpu config_cpu
config_platform config_platform
config_log_build_host config_log_build_host
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
#if uncommented, will fetch repos with read+write access. Useful for committers
#export WRITERIGHTS=1
#if uncommented, will build experimental cores as well which are not yet fit for release. #if uncommented, will build experimental cores as well which are not yet fit for release.
#export BUILD_EXPERIMENTAL=1 #export BUILD_EXPERIMENTAL=1
@ -178,16 +174,16 @@ export RA_ANDROID_MIN_API=android-9
# for Intel/PowerPC, but please don't. ;) Consider this a proof of concept # for Intel/PowerPC, but please don't. ;) Consider this a proof of concept
# for now just to test a few cores. # for now just to test a few cores.
if [[ "${FORMAT_COMPILER_TARGET}" = "osx" && -z "${NOUNIVERSAL}" ]]; then if [[ "$FORMAT_COMPILER_TARGET" = "osx" && -z "$NOUNIVERSAL" ]]; then
case "${ARCH}" in case "$ARCH" in
i385|x86_64) i386|x86_64)
export ARCHFLAGS="-arch i386 -arch x86_64" export ARCHFLAGS="-arch i386 -arch x86_64"
;; ;;
ppc|ppc64) ppc|ppc64)
export ARCHFLAGS="-arch ppc -arch ppc64" export ARCHFLAGS="-arch ppc -arch ppc64"
;; ;;
*) *)
echo "Universal build requested with unknown ARCH=\"${ARCH}\"" echo "Universal build requested with unknown ARCH=\"$ARCH\""
esac esac
fi fi

View File

@ -23,10 +23,10 @@ fi
# doing it wrong. We should fix this. # doing it wrong. We should fix this.
fetch_project_bsnes() fetch_project_bsnes()
{ {
echo "=== Fetching ${3} ===" echo "=== Fetching $3 ==="
fetch_git "${1}" "${2}" "" fetch_git "$1" "$2" ""
fetch_git "${WORKDIR}/${2}" "${2}/perf" "" fetch_git "$WORKDIR/$2" "$2/perf" ""
fetch_git "${WORKDIR}/${2}" "${2}/balanced" "" fetch_git "$WORKDIR/$2" "$2/balanced" ""
} }
@ -297,9 +297,9 @@ fetch_libretro_sdk() {
} }
if [ -n "${1}" ]; then if [ -n "$1" ]; then
while [ -n "${1}" ]; do while [ -n "$1" ]; do
"${1}" "$1"
shift shift
done done
else else