crochet
crochet copied to clipboard
Add lzop as compression option to CompressImage
Hello, would it be posstible to add lzop to CompressImage ?
diff --git a/config.sh.sample b/config.sh.sample
index 47157a5..ceeb8cd 100644
--- a/config.sh.sample
+++ b/config.sh.sample
@@ -108,9 +108,9 @@
#option Email [email protected]
# Compress the final image.
-# Takes an optional argument of xz or gzip. Defaults to xz.
+# Takes an optional argument of lzop, xz or gzip. Defaults to xz.
#
-#option CompressImage <xz|gzip>
+#option CompressImage <xz|gzip|lzop>
# Same as 'CompressImage gzip'
#option GzipImage
diff --git a/option/CompressImage/setup.sh b/option/CompressImage/setup.sh
index c8f8e0c..017e9e2 100644
--- a/option/CompressImage/setup.sh
+++ b/option/CompressImage/setup.sh
@@ -11,6 +11,16 @@ compress_image() {
fi
gzip -k $IMG
;;
+ lzop)
+ if [ -e /usr/local/bin/lzop ] ; then
+ if [ -f $IMG.lzo ]; then
+ rm $IMG.lzo
+ fi
+ lzop -k $IMG
+ else
+ echo Please install lzop
+ fi
+ ;;
*)
if [ -f $IMG.xz ]; then
rm $IMG.xz