From 212d9c31347177662e2585af0b3f9c5a93bc5e75 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 6 May 2016 02:09:55 +0200 Subject: iso2usb.sh: script should be able to run on older OS-es too. --- iso2usb.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'iso2usb.sh') diff --git a/iso2usb.sh b/iso2usb.sh index 211fb49..7bc8739 100644 --- a/iso2usb.sh +++ b/iso2usb.sh @@ -506,11 +506,15 @@ fi # Copy the ISO content into the USB Linux partition: echo "--- Copying files from ISO to USB... takes some time." if [ $VERBOSE -eq 1 ]; then + # Show verbose progress: rsync -av --progress --exclude=EFI ${ISOMNT}/* ${USBMNT}/ -else - # Display some progress because this can take a _long_ time: +elif [ -z "$(rsync --info=progress2 2>&1 |grep "unknown option")" ]; then + # Use recent rsync to display some progress because this can take _long_ : rsync -a --no-inc-recursive --info=progress2 --exclude=EFI \ ${ISOMNT}/* ${USBMNT}/ +else + # Remain silent if we have an older rsync: + rsync -a --exclude=EFI ${ISOMNT}/* ${USBMNT}/ fi # Write down the version of the ISO image: -- cgit v1.2.3