aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2026-04-17 16:19:38 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2026-04-17 16:19:38 +0200
commitb068584799bc99485778b7cefc0b5e67167ea8a2 (patch)
tree2ff4fa6ef93bfb26c8139483cf8da4cca2c88606
parent0eb150ba760b0ab9c286e2acd5105a762b90af1f (diff)
downloaddorsync-b068584799bc99485778b7cefc0b5e67167ea8a2.tar
dorsync-b068584799bc99485778b7cefc0b5e67167ea8a2.tar.gz
dorsync-b068584799bc99485778b7cefc0b5e67167ea8a2.tar.bz2
dorsync-b068584799bc99485778b7cefc0b5e67167ea8a2.tar.xz
dorsync-b068584799bc99485778b7cefc0b5e67167ea8a2.zip
Skip torrent files (mga#34826)HEADv3.3master
-rw-r--r--dorsync7
1 files changed, 5 insertions, 2 deletions
diff --git a/dorsync b/dorsync
index f6e4db2..ad4fc8f 100644
--- a/dorsync
+++ b/dorsync
@@ -64,7 +64,7 @@ cd "$location"
rsync_url="rsync://$user@bcd.mageia.org/isos/$release/"
select_isos () {
- isos=`RSYNC_PASSWORD="$password" rsync --list-only --no-recursive "$rsync_url" | tr -s ' ' | cut -f5 -d" " | grep -i "mageia"`
+ isos=`RSYNC_PASSWORD="$password" rsync --list-only --no-recursive "$rsync_url" | tr -s ' ' | cut -f5 -d" " | grep -vE "^\.|torrent"`
rm -f dorsync.skip
echo -e "\nFor each of the following ISOs, press Y to download/update it, or any other key to skip it:\n"
for iso in $isos; do
@@ -105,6 +105,8 @@ else
fi
rsyncargs=("-avHP")
+# Exclude torrent files. We only want ISOs.
+rsyncargs+=("--exclude=*.torrent")
if [ -e dorsync.skip ]; then
rsyncargs+=("--exclude-from=dorsync.skip")
@@ -132,6 +134,7 @@ echo ""
i=0
OIFS="$IFS"
IFS=$'\n'
+
# Sorted list with classic isos before live isos
for line in $(find . -type f \( ! -name "*Live*" \) -and \( -name "Mageia*.iso" \) -printf '%P\n' | sort && find . -type f -name "Mageia*Live*.iso" -printf '%P\n' | sort)
do
@@ -456,7 +459,7 @@ dodump () {
done
# Choose which USB to use
-echo ""
+ echo ""
while true
do
read -r -e -p "Please choose which USB to use or Q to quit and press <enter>: " usbchoice