Package:     backup2l
Subject:     Rearrange tar no-recursion option
Author:      Joachim Wiedorn <joodebian at joonet.de>
Bug-Debian:  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=899411
Forwarded:   no
Last-Update: 2018-06-06

Rearrange no-recursion option of tar.
---

diff -urN s09/first-time.conf s16/first-time.conf
--- s09/first-time.conf	2025-04-25 13:21:13.495504803 +0200
+++ s16/first-time.conf	2025-04-25 13:45:22.357132150 +0200
@@ -232,7 +232,7 @@
             ;;
         -create)        # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
             mkdir -p ${3}
-            tar cz -T $4 --no-recursion | split --bytes=725100100 - ${3}/part_
+            tar cz --no-recursion -T $4 | split --bytes=725100100 - ${3}/part_
             ;;
         -toc)           # Arguments: $2 = BID, $3 = archive file name
             cat ${3}/part_* | tar tz | sed 's#^#/#'
@@ -259,7 +259,7 @@
             echo "tar.gz"
             ;;
         -create)        # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
-            tar czf $3 -T $4 --no-recursion --atime-preserve 2>&1 \
+            tar czf $3 --no-recursion -T $4 --atime-preserve 2>&1 \
                 | grep -v 'tar: Removing leading .* from .* names'
             ;;
         -toc)           # Arguments: $2 = BID, $3 = archive file name
@@ -376,7 +376,7 @@
             echo "tar.pgp"
             ;;
         -create)        # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
-            tar -c -T $4 --no-recursion | /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -c -  > $3
+            tar -c --no-recursion -T $4 | /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -c -  > $3
             ;;
         -toc)           # Arguments: $2 = BID, $3 = archive file name
             /usr/bin/gpg --batch --no-tty -q --passphrase-fd 3 3</etc/backup2l.pass -d $3 2>/dev/null | tar t | sed 's#^#/#'
@@ -408,13 +408,13 @@
             echo "tar.gz"
             ;;
         -create)        # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
-            tar cf $3 -T $4 -I pigz --no-recursion --atime-preserve 2>&1 | grep -v 'tar: Removing leading .* from .* names'
+            tar cf $3 --no-recursion --atime-preserve -I pigz -T $4 2>&1 | grep -v 'tar: Removing leading .* from .* names'
             ;;
         -toc)           # Arguments: $2 = BID, $3 = archive file name
             tar tf $3 -I pigz | sed 's#^#/#'
             ;;
         -extract)       # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
-            tar x --same-permission --same-owner -I pigz -f $3 -T $4 2>&1
+            tar xf $3 --same-permission --same-owner -I pigz -T $4 2>&1
             ;;
     esac
 }
@@ -432,7 +432,7 @@
             echo "tar.lz"
             ;;
         -create)        # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
-            tar -c -T $4 --no-recursion | lzip --best -c > $3 2>&1 \
+            tar -c --no-recursion -T $4 | lzip --best -c > $3 2>&1 \
                 | grep -v 'tar: Removing leading .* from .*'
             ;;
         -toc)           # Arguments: $2 = BID, $3 = archive file name
@@ -457,7 +457,7 @@
             echo "tar.xz"
             ;;
         -create)        # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
-            tar cJf $3 -T $4 --no-recursion --atime-preserve 2>&1 | grep -v 'tar: Removing leading .* from .* names'
+            tar cJf $3 --no-recursion --atime-preserve -T $4 2>&1 | grep -v 'tar: Removing leading .* from .* names'
             ;;
         -toc)           # Arguments: $2 = BID, $3 = archive file name
             tar tJf $3 | sed 's#^#/#'
