make build scripts more tolerant against the space character in path
This commit is contained in:
parent
e9e90487f3
commit
c93e29edff
8
apple.sh
8
apple.sh
|
@ -56,14 +56,14 @@ create_umbrella_xcframework() {
|
||||||
local BUILD_COMMAND="xcodebuild -create-xcframework "
|
local BUILD_COMMAND="xcodebuild -create-xcframework "
|
||||||
|
|
||||||
for ARCHITECTURE_VARIANT_INDEX in "${TARGET_ARCHITECTURE_VARIANT_INDEX_ARRAY[@]}"; do
|
for ARCHITECTURE_VARIANT_INDEX in "${TARGET_ARCHITECTURE_VARIANT_INDEX_ARRAY[@]}"; do
|
||||||
local FRAMEWORK_PATH=${BASEDIR}/prebuilt/$(get_framework_directory "${ARCHITECTURE_VARIANT_INDEX}")/${FRAMEWORK_NAME}.framework
|
local FRAMEWORK_PATH="${BASEDIR}"/prebuilt/$(get_framework_directory "${ARCHITECTURE_VARIANT_INDEX}")/${FRAMEWORK_NAME}.framework
|
||||||
BUILD_COMMAND+=" -framework ${FRAMEWORK_PATH}"
|
BUILD_COMMAND+=" -framework \"${FRAMEWORK_PATH}\""
|
||||||
done
|
done
|
||||||
|
|
||||||
BUILD_COMMAND+=" -output ${XCFRAMEWORK_PATH}"
|
BUILD_COMMAND+=" -output \"${XCFRAMEWORK_PATH}\""
|
||||||
|
|
||||||
# EXECUTE CREATE FRAMEWORK COMMAND
|
# EXECUTE CREATE FRAMEWORK COMMAND
|
||||||
COMMAND_OUTPUT=$(${BUILD_COMMAND} 2>&1)
|
COMMAND_OUTPUT=$(eval ${BUILD_COMMAND} 2>&1)
|
||||||
RC=$?
|
RC=$?
|
||||||
echo -e "DEBUG: ${COMMAND_OUTPUT}\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "DEBUG: ${COMMAND_OUTPUT}\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
|
|
||||||
|
|
|
@ -1921,53 +1921,53 @@ autoreconf_library() {
|
||||||
clone_git_repository_with_commit_id() {
|
clone_git_repository_with_commit_id() {
|
||||||
local RC
|
local RC
|
||||||
|
|
||||||
(mkdir -p $2 1>>"${BASEDIR}"/build.log 2>&1)
|
(mkdir -p "$2" 1>>"${BASEDIR}"/build.log 2>&1)
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
if [ ${RC} -ne 0 ]; then
|
if [ ${RC} -ne 0 ]; then
|
||||||
echo -e "\nINFO: Failed to create local directory $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "\nINFO: Failed to create local directory $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1
|
rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
echo ${RC}
|
echo ${RC}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "INFO: Cloning commit id $3 from repository $1 into local directory $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "INFO: Cloning commit id $3 from repository $1 into local directory $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
|
|
||||||
(git clone $1 $2 --depth 1 1>>"${BASEDIR}"/build.log 2>&1)
|
(git clone "$1" "$2" --depth 1 1>>"${BASEDIR}"/build.log 2>&1)
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
if [ ${RC} -ne 0 ]; then
|
if [ ${RC} -ne 0 ]; then
|
||||||
echo -e "\nINFO: Failed to clone $1\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "\nINFO: Failed to clone $1\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1
|
rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
echo ${RC}
|
echo ${RC}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $2 1>>"${BASEDIR}"/build.log 2>&1
|
cd "$2" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
if [ ${RC} -ne 0 ]; then
|
if [ ${RC} -ne 0 ]; then
|
||||||
echo -e "\nINFO: Failed to cd into $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "\nINFO: Failed to cd into $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1
|
rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
echo ${RC}
|
echo ${RC}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(git fetch --depth 1 origin $3 1>>"${BASEDIR}"/build.log 2>&1)
|
(git fetch --depth 1 origin "$3" 1>>"${BASEDIR}"/build.log 2>&1)
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
if [ ${RC} -ne 0 ]; then
|
if [ ${RC} -ne 0 ]; then
|
||||||
echo -e "\nINFO: Failed to fetch commit id $3 from $1\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "\nINFO: Failed to fetch commit id $3 from $1\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1
|
rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
echo ${RC}
|
echo ${RC}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(git checkout $3 1>>"${BASEDIR}"/build.log 2>&1)
|
(git checkout "$3" 1>>"${BASEDIR}"/build.log 2>&1)
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
|
@ -1988,26 +1988,26 @@ clone_git_repository_with_commit_id() {
|
||||||
clone_git_repository_with_tag() {
|
clone_git_repository_with_tag() {
|
||||||
local RC
|
local RC
|
||||||
|
|
||||||
(mkdir -p $3 1>>"${BASEDIR}"/build.log 2>&1)
|
(mkdir -p "$3" 1>>"${BASEDIR}"/build.log 2>&1)
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
if [ ${RC} -ne 0 ]; then
|
if [ ${RC} -ne 0 ]; then
|
||||||
echo -e "\nINFO: Failed to create local directory $3\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "\nINFO: Failed to create local directory $3\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
rm -rf $3 1>>"${BASEDIR}"/build.log 2>&1
|
rm -rf "$3" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
echo ${RC}
|
echo ${RC}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "INFO: Cloning tag $2 from repository $1 into local directory $3\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "INFO: Cloning tag $2 from repository $1 into local directory $3\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
|
|
||||||
(git clone --depth 1 --branch $2 $1 $3 1>>"${BASEDIR}"/build.log 2>&1)
|
(git clone --depth 1 --branch "$2" "$1" "$3" 1>>"${BASEDIR}"/build.log 2>&1)
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
if [ ${RC} -ne 0 ]; then
|
if [ ${RC} -ne 0 ]; then
|
||||||
echo -e "\nINFO: Failed to clone $1 -> $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
echo -e "\nINFO: Failed to clone $1 -> $2\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
rm -rf $3 1>>"${BASEDIR}"/build.log 2>&1
|
rm -rf "$3" 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
echo ${RC}
|
echo ${RC}
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user