From d4c6cba517f18c96df4d32ba7a277621f461cd13 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Thu, 16 Sep 2021 08:41:21 +0100 Subject: [PATCH] fix duplicate apple framework identifiers, fixes #93 --- scripts/function-apple.sh | 4 ++-- scripts/function.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/function-apple.sh b/scripts/function-apple.sh index 97bc79e..8ed878b 100755 --- a/scripts/function-apple.sh +++ b/scripts/function-apple.sh @@ -424,9 +424,9 @@ create_single_framework() { initialize_folder "${FRAMEWORK_PATH}" - local CAPITAL_CASE_LIBRARY_NAME=$(to_capital_case "${LIBRARY_NAME}") + local CAPITAL_CASE_FRAMEWORK_NAME=$(to_capital_case "${FRAMEWORK_NAME}") - build_info_plist "${FRAMEWORK_PATH}/Info.plist" "${LIBRARY_NAME}" "com.arthenica.ffmpegkit.${CAPITAL_CASE_LIBRARY_NAME}" "${LIBRARY_VERSION}" "${LIBRARY_VERSION}" + build_info_plist "${FRAMEWORK_PATH}/Info.plist" "${LIBRARY_NAME}" "com.arthenica.ffmpegkit.${CAPITAL_CASE_FRAMEWORK_NAME}" "${LIBRARY_VERSION}" "${LIBRARY_VERSION}" cp "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")/${LIBRARY_NAME}/lib/${STATIC_LIBRARY_NAME}.a" "${FRAMEWORK_PATH}/${FRAMEWORK_NAME}" 1>>"${BASEDIR}/build.log" 2>&1 diff --git a/scripts/function.sh b/scripts/function.sh index ae7c699..4b7ad4b 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -1318,8 +1318,8 @@ get_external_library_license_path() { copy_external_library_license() { output_path_array=("$2") for output_path in "${output_path_array[@]}"; do - $(copy_external_library_license_file "$1" "${output_path}/LICENSE") - if [[ $? -ne 0 ]]; then + RESULT=$(copy_external_library_license_file "$1" "${output_path}/LICENSE") + if [[ ${RESULT} -ne 0 ]]; then echo 1 return fi @@ -1330,8 +1330,8 @@ copy_external_library_license() { # 1 - library index # 2 - output path copy_external_library_license_file() { - $(cp $(get_external_library_license_path "$1") "$2" 1>>"${BASEDIR}"/build.log 2>&1) - if [[ $? -ne 0 ]]; then + RESULT=$(cp $(get_external_library_license_path "$1") "$2" 1>>"${BASEDIR}"/build.log 2>&1) + if [[ ${RESULT} -ne 0 ]]; then echo 1 return fi