summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-04 14:16:53 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-08-04 14:16:53 -0300
commit7e50ae7becc4ee9b89664a8ec4eca4193cc74482 (patch)
tree8dbe806c33fb833f3427b603e03f7084787b41b6
parente45761f4049a7732242aa9572e3f6d87e60d391c (diff)
Only remove synced files, avoids removing packages added by librestage during sync
-rwxr-xr-xlibrerelease9
1 files changed, 6 insertions, 3 deletions
diff --git a/librerelease b/librerelease
index a03ea98..82a6ab4 100755
--- a/librerelease
+++ b/librerelease
@@ -91,7 +91,7 @@ function clean_non_packages {
# Clean everything if not on dry-run mode
function clean {
[ -z ${dryrun} ] && \
- find ${WORKDIR}/staging/ -type f -delete
+ rm -f $@
}
if [ -w / ]; then
@@ -126,6 +126,9 @@ fi
find ${WORKDIR}/staging -type f -exec chmod 644 {} \;
find ${WORKDIR}/staging -type d -exec chmod 755 {} \;
+# Get the synced files
+SYNCED_FILES=($(find ${WORKDIR}/staging -type f))
+
msg "Uploading packages..."
rsync --recursive \
${dryrun} \
@@ -144,8 +147,8 @@ rsync --recursive \
exit 1
}
-msg "Removing packages from local [staging]"
-clean
+msg "Removing ${#SYNCED_FILES[@]} packages from local [staging]"
+clean ${SYNCED_FILES[@]}
msg "Running db-update on repos"
ssh ${PARABOLAHOST} dbscripts/db-update