From 5f1a5809f659b3f46ce9e35f722f5d6b313a532f Mon Sep 17 00:00:00 2001 From: MrsB Date: Fri, 30 Jan 2015 14:36:47 +0000 Subject: Use sorted iso lists with classic isos above live isos --- dorsync | 6 ++++-- 1 file 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"` -- cgit v1.2.1