]> asedeno.scripts.mit.edu Git - sipb-mirrors.git/commitdiff
Unify rsync exitstatus handling
authorAlejandro R. Sedeño <asedeno@mit.edu>
Tue, 1 Mar 2022 14:16:34 +0000 (09:16 -0500)
committerAlejandro R. Sedeño <asedeno@mit.edu>
Wed, 2 Mar 2022 02:48:27 +0000 (21:48 -0500)
OPTIONS.sh
fetch-hudson

index c213458297fee1c738fa8cba54591e81f63f527e..7f097c147f8ebc45b4845f5cf0a5decf8505a161 100644 (file)
@@ -4,9 +4,11 @@ rsync () {
     # Ignore these exit statuses from rsync:
     #   23  Partial transfer due to error
     #   24  Partial transfer due to vanished source files
+    #   25  The --max-delete limit stopped deletions
     command rsync "$@" || (
         case "$?" in
-            23 | 24) echo "mirrors.mit.edu: Ignoring rsync exit status $?" >&2;;
+            23 | 24 | 25)
+                echo "mirrors.mit.edu: Ignoring rsync exit status $?" >&2;;
             *) exit $?
         esac
     )
index 0bb95a467b41824fd1eac487c44553dae2efe864..3a18fde4dfb78b1bfc0ab665b9f319ed318db954 100755 (executable)
@@ -33,8 +33,4 @@ date +"Starting $scriptname: %c"
 
 exitstatus=$?
 date +"Done: %c"
-if [[ $exitstatus -eq 25 ]]; then
-    echo "Error code $exitstatus ignored."
-    exit 0
-fi
 exit $exitstatus