]> asedeno.scripts.mit.edu Git - sipb-mirrors.git/blobdiff - fetch-scripts/ubuntu-archive
Create script for Parrot Security OS <https://www.parrotsec.org/>
[sipb-mirrors.git] / fetch-scripts / ubuntu-archive
old mode 100755 (executable)
new mode 100644 (file)
index da60b01..385c6ad
@@ -1,20 +1,25 @@
 #!/bin/sh
 
-. ../OPTIONS.sh
-
 RSYNCSOURCE=rsync://archive.ubuntu.com/ubuntu
 #RSYNCSOURCE=rsync://ubuntu.media.mit.edu/ubuntu
 BASEDIR=${MIRRORDIR}/ubuntu
 
+set -x
+set -v
+set -e
+set -u
+
+# Options we only use in the first pass, where we do not want packages/sources to fly in yet and dont want to delete files
+PASS1=(--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude InRelease --exclude i18n/\* --exclude ls-lR\* --exclude Translation\*)
+
 rsync --recursive --times --links --hard-links \
       --stats \
-      -P \
-      --exclude "Packages*" --exclude "Sources*" \
-      --exclude "Release*" \
-      ${RSYNCSOURCE} ${BASEDIR} | tee -a ~/rsync.log
+      --verbose --timeout=600 \
+      "${PASS1[@]}" \
+      ${RSYNCSOURCE} ${BASEDIR}
 
 rsync --recursive --times --links --hard-links \
       --stats --delete --delete-after \
-      -P \
+      --verbose --timeout=600 \
       --exclude "project/trace/${HOSTNAME}" \
-      ${RSYNCSOURCE} ${BASEDIR} | tee -a ~/rsync.log
+      ${RSYNCSOURCE} ${BASEDIR}