aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMrsB <eeeemail@gmail.com>2015-01-30 14:36:47 +0000
committerMrsB <eeeemail@gmail.com>2015-01-30 14:36:47 +0000
commit5f1a5809f659b3f46ce9e35f722f5d6b313a532f (patch)
tree31835050dfc73eed9d1edc4c1c955a823488a247
parent0aca09da267607f2e38d4fa4185ecda2278c59c6 (diff)
downloaddorsync-5f1a5809f659b3f46ce9e35f722f5d6b313a532f.tar
dorsync-5f1a5809f659b3f46ce9e35f722f5d6b313a532f.tar.gz
dorsync-5f1a5809f659b3f46ce9e35f722f5d6b313a532f.tar.bz2
dorsync-5f1a5809f659b3f46ce9e35f722f5d6b313a532f.tar.xz
dorsync-5f1a5809f659b3f46ce9e35f722f5d6b313a532f.zip
Use sorted iso lists with classic isos above live isos
-rw-r--r--dorsync6
1 files changed, 4 insertions, 2 deletions
diff --git a/dorsync b/dorsync
index 67def1a..b24699f 100644
--- a/dorsync
+++ b/dorsync
@@ -74,7 +74,8 @@ echo ""
i=0
OIFS="$IFS"
IFS=$'\n'
-for line in $(find . -type f -name "*.iso" -printf '%P\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
directory[$i]=`dirname "$line"`
iso[$i]=`basename "$line"`
@@ -255,7 +256,8 @@ findisos () {
i=0
OIFS="$IFS"
IFS=$'\n'
- for line in $(find . -type f -name "*.iso" -printf '%P\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
directory[$i]=`dirname "$line"`
iso[$i]=`basename "$line"`