tools/livecd-iso-to-disk.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-)
New commits: commit e2b1bb68fc602dd44e5f7b34df60cf1ed4d4b36a Author: Brian C. Lane <[email protected]> Date: Tue Aug 23 17:17:21 2011 -0700 Use copyFile on the iso diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index d6adeeb..43c825e 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -1055,7 +1055,7 @@ if [ \( "$srctype" = "installer" -o "$srctype" = "netinst" \) ]; then done fi if [ "$srctype" = "installer" -a -z "$skipcopy" ]; then - cp "$SRC" $TGTMNT/ + copyFile "$SRC" $TGTMNT/ fi sync fi commit 24053dd826566d5bc1ca51a72278096bdd05bba0 Author: Brian C. Lane <[email protected]> Date: Tue Aug 23 15:01:59 2011 -0700 Use rsync to copy if available diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index b35255c..d6adeeb 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -640,6 +640,10 @@ cp_p() { } copyFile() { + if [ -x /usr/bin/rsync ]; then + rsync -P "$1" "$2" + return + fi if [ -x /usr/bin/gvfs-copy ]; then gvfs-copy -p "$1" "$2" return commit 840fa86b4d7e34cd1d863b314831c7311411cb3b Author: Bruno Wolff III <[email protected]> Date: Thu Aug 11 15:55:59 2011 -0700 Quote $SRC so iso's with spaces will work (#694915) diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 209f858..b35255c 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -856,9 +856,9 @@ fi # FIXME: would be better if we had better mountpoints SRCMNT=$(mktemp -d /media/srctmp.XXXXXX) -if [ -b $SRC ]; then +if [ -b "$SRC" ]; then mount -o ro "$SRC" $SRCMNT || exitclean -elif [ -f $SRC ]; then +elif [ -f "$SRC" ]; then mount -o loop,ro "$SRC" $SRCMNT || exitclean else echo "$SRC is not a file or block device." @@ -969,7 +969,7 @@ fi # Verify available space for DVD installer if [ "$srctype" = "installer" ]; then if [ -z "$skipcopy" ]; then - srcsize=$(du -s -B 1M $SRC | awk {'print $1;'}) + srcsize=$(du -s -B 1M "$SRC" | awk {'print $1;'}) else srcsize=0 fi @@ -984,8 +984,8 @@ if [ "$srctype" = "installer" ]; then if [ -e $TGTMNT/$imgpath ]; then tbd=$(du -s -B 1M $TGTMNT/$imgpath | awk {'print $1;'}) fi - if [ -e $TGTMNT/$(basename $SRC) ]; then - tbd=$(($tbd + $(du -s -B 1M $TGTMNT/$(basename $SRC) | awk {'print $1;'}))) + if [ -e $TGTMNT/$(basename "$SRC") ]; then + tbd=$(($tbd + $(du -s -B 1M $TGTMNT/$(basename "$SRC") | awk {'print $1;'}))) fi echo "Size of DVD image: $srcsize" echo "Size of $imgpath: $installimgsize" @@ -1051,7 +1051,7 @@ if [ \( "$srctype" = "installer" -o "$srctype" = "netinst" \) ]; then done fi if [ "$srctype" = "installer" -a -z "$skipcopy" ]; then - cp $SRC $TGTMNT/ + cp "$SRC" $TGTMNT/ fi sync fi @@ -1094,20 +1094,20 @@ if [ -n "$efi" ]; then exitclean else # dump the eltorito image with dumpet, output is $SRC.1 - dumpet -i $SRC -d + dumpet -i "$SRC" -d EFIMNT=$(mktemp -d /media/srctmp.XXXXXX) - mount -o loop $SRC.1 $EFIMNT + mount -o loop "$SRC".1 $EFIMNT if [ -f $EFIMNT$EFI_BOOT/+(BOOT|boot)?*.efi ]; then cp $EFIMNT$EFI_BOOT/+(BOOT|boot)?*.efi $TGTMNT$EFI_BOOT else echo "No BOOT*.efi found in eltorito image. EFI will not boot" umount $EFIMNT - rm $SRC.1 + rm "$SRC".1 exitclean fi umount $EFIMNT - rm $SRC.1 + rm "$SRC".1 fi fi fi -- livecd mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/livecd
