Skip to content

Add lzop as compression option to CompressImage #274

Description

@manonfgoo

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 me@gmail.com
 
 # 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions