Use -no-progress option for mksquashfs only if it's supported
authorMichael Prokop <mika@grml.org>
Fri, 11 Jan 2008 08:14:15 +0000 (09:14 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 11 Jan 2008 08:14:15 +0000 (09:14 +0100)
debian/changelog
grml-live

index c35cb70..0e15fa5 100644 (file)
@@ -22,6 +22,7 @@ grml-live (0.1) unstable; urgency=low
     remove packages via dpkg instead of apt-get. Thanks for the
     bugreport and the patch, Lupe Christoph! [Closes: issue367]
   * Add SQUASHFS_ZLIB template to grml-live.conf.
+  * Use -no-progress option for mksquashfs only if it's supported.
 
  -- Michael Prokop <mika@grml.org>  Fri, 11 Jan 2008 01:56:01 +0100
 
index 76971e3..ab0b1c1 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -547,8 +547,13 @@ else
    [ -f "$CHROOT_OUTPUT/base.tgz" ] && rm -f "$CHROOT_OUTPUT/base.tgz"
 
    # execute squashfs:
-   log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress"
-   mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB
+   if mksquashfs --help 2>&1 | grep -- -no-progress ; then
+      log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress"
+      mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend -no-progress $SQUASHFS_OPTIONS $SQUASHFS_ZLIB
+   else
+      log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend"
+      mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/grml.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB
+   fi
    log "Finished execution of stage 'squashfs' [$(date)]"
    einfo "Finished execution of stage 'squashfs'" ; eend 0
 fi