mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-12 08:11:05 +00:00
Add checks for unbound variables
This commit is contained in:
parent
aa8260df2c
commit
5f17b4e6d3
@ -11,6 +11,8 @@
|
|||||||
# See http://www.cryptopp.com/wiki/Android_(Command_Line) for more details
|
# See http://www.cryptopp.com/wiki/Android_(Command_Line) for more details
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
unset IS_CROSS_COMPILE
|
unset IS_CROSS_COMPILE
|
||||||
|
|
||||||
unset IS_IOS
|
unset IS_IOS
|
||||||
@ -32,7 +34,7 @@ unset ANDROID_STL_INC ANDROID_STL_LIB
|
|||||||
unset CPP CC CXX LD AS AR RANLIB STRIP
|
unset CPP CC CXX LD AS AR RANLIB STRIP
|
||||||
|
|
||||||
# Similar to a "make clean"
|
# Similar to a "make clean"
|
||||||
if [ "$1" = "unset" ]; then
|
if [ x"${1-}" = "xunset" ]; then
|
||||||
echo "Unsetting script variables. PATH may remain tainted"
|
echo "Unsetting script variables. PATH may remain tainted"
|
||||||
[ "$0" = "$BASH_SOURCE" ] && exit 0 || return 0
|
[ "$0" = "$BASH_SOURCE" ] && exit 0 || return 0
|
||||||
fi
|
fi
|
||||||
@ -41,7 +43,7 @@ fi
|
|||||||
# Note: 4.9 is required for the latest architectures, like ARM64/AARCH64.
|
# Note: 4.9 is required for the latest architectures, like ARM64/AARCH64.
|
||||||
# AOSP_TOOLCHAIN_SUFFIX=4.8
|
# AOSP_TOOLCHAIN_SUFFIX=4.8
|
||||||
# AOSP_TOOLCHAIN_SUFFIX=4.9
|
# AOSP_TOOLCHAIN_SUFFIX=4.9
|
||||||
if [ -z "$AOSP_TOOLCHAIN_SUFFIX" ]; then
|
if [ -z "${AOSP_TOOLCHAIN_SUFFIX-}" ]; then
|
||||||
AOSP_TOOLCHAIN_SUFFIX=4.9
|
AOSP_TOOLCHAIN_SUFFIX=4.9
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -57,7 +59,7 @@ fi
|
|||||||
# AOSP_API="android-19" # Android 4.4 and above
|
# AOSP_API="android-19" # Android 4.4 and above
|
||||||
# AOSP_API="android-21" # Android 5.0 and above
|
# AOSP_API="android-21" # Android 5.0 and above
|
||||||
# AOSP_API="android-23" # Android 6.0 and above
|
# AOSP_API="android-23" # Android 6.0 and above
|
||||||
if [ -z "$AOSP_API" ]; then
|
if [ -z "${AOSP_API-}" ]; then
|
||||||
AOSP_API="android-21"
|
AOSP_API="android-21"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -68,7 +70,7 @@ fi
|
|||||||
# If the user did not specify the NDK location, try and pick it up. We expect something
|
# If the user did not specify the NDK location, try and pick it up. We expect something
|
||||||
# like ANDROID_NDK_ROOT=/opt/android-ndk-r10e or ANDROID_NDK_ROOT=/usr/local/android-ndk-r10e.
|
# like ANDROID_NDK_ROOT=/opt/android-ndk-r10e or ANDROID_NDK_ROOT=/usr/local/android-ndk-r10e.
|
||||||
|
|
||||||
if [ -z "$ANDROID_NDK_ROOT" ]; then
|
if [ -z "${ANDROID_NDK_ROOT-}" ]; then
|
||||||
ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1)
|
ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1)
|
||||||
|
|
||||||
if [ -z "$ANDROID_NDK_ROOT" ]; then
|
if [ -z "$ANDROID_NDK_ROOT" ]; then
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
# See http://www.cryptopp.com/wiki/ARM_Embedded_(Command_Line) for details.
|
# See http://www.cryptopp.com/wiki/ARM_Embedded_(Command_Line) for details.
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
# Unset old options
|
# Unset old options
|
||||||
|
|
||||||
unset IS_CROSS_COMPILE
|
unset IS_CROSS_COMPILE
|
||||||
@ -21,7 +23,7 @@ unset IS_IOS
|
|||||||
unset IS_ANDROID
|
unset IS_ANDROID
|
||||||
unset IS_ARM_EMBEDDED
|
unset IS_ARM_EMBEDDED
|
||||||
|
|
||||||
if [ -z "$ARM_EMBEDDED_TOOLCHAIN" ]; then
|
if [ -z "${ARM_EMBEDDED_TOOLCHAIN-}" ]; then
|
||||||
ARM_EMBEDDED_TOOLCHAIN="/usr/bin"
|
ARM_EMBEDDED_TOOLCHAIN="/usr/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
# See http://www.cryptopp.com/wiki/iOS_(Command_Line) for more details
|
# See http://www.cryptopp.com/wiki/iOS_(Command_Line) for more details
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
##### Clear old options #####
|
##### Clear old options #####
|
||||||
#########################################
|
#########################################
|
||||||
@ -38,6 +40,9 @@ SETENV_VERBOSE=1
|
|||||||
##### Command line #####
|
##### Command line #####
|
||||||
########################################
|
########################################
|
||||||
|
|
||||||
|
APPLE_SDK=
|
||||||
|
IOS_ARCH=
|
||||||
|
|
||||||
for ARG in "$@"
|
for ARG in "$@"
|
||||||
do
|
do
|
||||||
CL=$(echo $ARG | tr '[A-Z]' '[a-z]')
|
CL=$(echo $ARG | tr '[A-Z]' '[a-z]')
|
||||||
@ -132,7 +137,7 @@ fi
|
|||||||
# move /Applications/Xcode somewhere else for a side-by-side installation.
|
# move /Applications/Xcode somewhere else for a side-by-side installation.
|
||||||
# These sorts of tricks are a required procedure on Apple's gear:
|
# These sorts of tricks are a required procedure on Apple's gear:
|
||||||
# http://stackoverflow.com/questions/11651773/install-simulator-sdk-4-3-to-xcode-4-4-on-mountain-lion
|
# http://stackoverflow.com/questions/11651773/install-simulator-sdk-4-3-to-xcode-4-4-on-mountain-lion
|
||||||
if [ -z "$XCODE_DEVELOPER" ]; then
|
if [ -z "${XCODE_DEVELOPER-}" ]; then
|
||||||
XCODE_DEVELOPER=$(xcode-select -print-path 2>/dev/null)
|
XCODE_DEVELOPER=$(xcode-select -print-path 2>/dev/null)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -233,8 +238,8 @@ if [ "$SETENV_VERBOSE" == "1" ]; then
|
|||||||
echo "XCODE_DEVELOPER_TOP: $XCODE_DEVELOPER_TOP"
|
echo "XCODE_DEVELOPER_TOP: $XCODE_DEVELOPER_TOP"
|
||||||
echo "IOS_ARCH: $IOS_ARCH"
|
echo "IOS_ARCH: $IOS_ARCH"
|
||||||
echo "IOS_TOOLCHAIN: $IOS_TOOLCHAIN"
|
echo "IOS_TOOLCHAIN: $IOS_TOOLCHAIN"
|
||||||
echo "IOS_FLAGS: $IOS_FLAGS"
|
echo "IOS_FLAGS: ${IOS_FLAGS-}"
|
||||||
echo "IOS_SYSROOT: $IOS_SYSROOT"
|
echo "IOS_SYSROOT: ${IOS_SYSROOT-}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user