diff --git a/ffmpeg-android-maker.sh b/ffmpeg-android-maker.sh index 8f83171..3ba436c 100755 --- a/ffmpeg-android-maker.sh +++ b/ffmpeg-android-maker.sh @@ -84,13 +84,14 @@ do # Executing the component-specific script for downloading the source code source ${SCRIPTS_DIR}/${COMPONENT}/download.sh + SANITIZED_COMPONENT_NAME=$(echo ${COMPONENT} | sed "s/-/_/") # The download.sh script has to export SOURCES_DIR_$COMPONENT variable # with actual path of the source code. This is done for possiblity to switch # between different verions of a component. # If it isn't set, consider SOURCE_DIR_FOR_COMPONENT as the proper value - COMPONENT_SOURCES_DIR_VARIABLE=SOURCES_DIR_${COMPONENT} + COMPONENT_SOURCES_DIR_VARIABLE=SOURCES_DIR_${SANITIZED_COMPONENT_NAME} if [[ -z "${!COMPONENT_SOURCES_DIR_VARIABLE}" ]]; then - export SOURCES_DIR_${COMPONENT}=${SOURCE_DIR_FOR_COMPONENT} + export SOURCES_DIR_${SANITIZED_COMPONENT_NAME}=${SOURCE_DIR_FOR_COMPONENT} fi # Returning to the rood directory. Just in case. @@ -106,7 +107,8 @@ do for COMPONENT in ${COMPONENTS_TO_BUILD[@]} do echo "Building the component: ${COMPONENT}" - COMPONENT_SOURCES_DIR_VARIABLE=SOURCES_DIR_${COMPONENT} + SANITIZED_COMPONENT_NAME=$(echo ${COMPONENT} | sed "s/-/_/") + COMPONENT_SOURCES_DIR_VARIABLE=SOURCES_DIR_${SANITIZED_COMPONENT_NAME} # Going to the actual source code directory of the current component cd ${!COMPONENT_SOURCES_DIR_VARIABLE} diff --git a/scripts/common-functions.sh b/scripts/common-functions.sh index 5867335..a78dfa1 100755 --- a/scripts/common-functions.sh +++ b/scripts/common-functions.sh @@ -29,5 +29,6 @@ function downloadTarArchive() { rm ${ARCHIVE_NAME} fi - export SOURCES_DIR_${LIBRARY_NAME}=$(pwd)/${LIBRARY_SOURCES} + SANITIZED_COMPONENT_NAME=$(echo ${LIBRARY_NAME} | sed "s/-/_/") + export SOURCES_DIR_${SANITIZED_COMPONENT_NAME}=$(pwd)/${LIBRARY_SOURCES} }