2411: Add exceptions.
[arvados.git] / build / run-build-packages-one-target.sh
index 685ca5156466135856fddcc90535ae770c5c3952..5cfdfe625ff3ab22d9d0690b169ad6baa0b54b39 100755 (executable)
@@ -194,6 +194,14 @@ if [[ -n "$test_packages" ]]; then
 else
     echo
     echo "START: build packages on $IMAGE" >&2
+    # Move existing packages and other files into the processed/ subdirectory
+    if [[ ! -e "${WORKSPACE}/packages/${TARGET}/processed" ]]; then
+      mkdir -p "${WORKSPACE}/packages/${TARGET}/processed"
+    fi
+    set +e
+    mv -f ${WORKSPACE}/packages/${TARGET}/* ${WORKSPACE}/packages/${TARGET}/processed/ 2>/dev/null
+    set -e
+    # Build packages
     if docker run --rm \
         "${docker_volume_args[@]}" \
         --env ARVADOS_DEBUG=$ARVADOS_DEBUG \