diff --git a/src/build.sh b/src/build.sh index eca2ccbec4a5e5982e8bfc4b8a8951699da7192b..53ae3c753fbb3051958cf84d4ea3824583861654 100755 --- a/src/build.sh +++ b/src/build.sh @@ -195,21 +195,23 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then echo ">> [$(date)] Running: repo init $REPO_INIT_PARAM -u \"$REPO\" -b \"${TAG_PREFIX}${BRANCH_NAME}\" $REPO_GROUPS" yes | repo init $REPO_INIT_PARAM -u "$REPO" -b "${TAG_PREFIX}${BRANCH_NAME}" $REPO_GROUPS - if [ "$REPO_CUSTOM_MANIFEST" != false ]; then - wget -O .repo/manifests/default.xml $REPO_CUSTOM_MANIFEST + if [ -n "$REPO_CUSTOM_MANIFEST" ] && [ "$REPO_CUSTOM_MANIFEST" != "false" ]; then + wget -O .repo/manifests/default.xml "$REPO_CUSTOM_MANIFEST" + rm -f .repo/local_manifests/*.xml fi - # Copy local manifests to the appropriate folder in order take them into consideration - echo ">> [$(date)] Copying '$LMANIFEST_DIR/*.xml' to '.repo/local_manifests/'" - mkdir -p .repo/local_manifests - rsync -a --delete --include '*.xml' --exclude '*' "$LMANIFEST_DIR/" .repo/local_manifests/ - - rm -f .repo/local_manifests/proprietary.xml - if [ "$INCLUDE_PROPRIETARY" = true ]; then - wget -q -O .repo/local_manifests/proprietary.xml "https://raw.githubusercontent.com/TheMuppets/manifests/$themuppets_branch/muppets.xml" - /root/build_manifest.py --remote "https://gitlab.com" --remotename "gitlab_https" \ - "https://gitlab.com/the-muppets/manifest/raw/$themuppets_branch/muppets.xml" .repo/local_manifests/proprietary_gitlab.xml - + if [ -z "$REPO_CUSTOM_MANIFEST" ] || [ "$REPO_CUSTOM_MANIFEST" = "false" ]; then + # Copy local manifests to the appropriate folder in order take them into consideration + echo ">> [$(date)] Copying '$LMANIFEST_DIR/*.xml' to '.repo/local_manifests/'" + mkdir -p .repo/local_manifests + rsync -a --delete --include '*.xml' --exclude '*' "$LMANIFEST_DIR/" .repo/local_manifests/ + + rm -f .repo/local_manifests/proprietary.xml + if [ "$INCLUDE_PROPRIETARY" = true ]; then + wget -q -O .repo/local_manifests/proprietary.xml "https://raw.githubusercontent.com/TheMuppets/manifests/$themuppets_branch/muppets.xml" + /root/build_manifest.py --remote "https://gitlab.com" --remotename "gitlab_https" \ + "https://gitlab.com/the-muppets/manifest/raw/$themuppets_branch/muppets.xml" .repo/local_manifests/proprietary_gitlab.xml + fi fi echo ">> [$(date)] Syncing branch repository"