Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lzop as compression option to CompressImage #274

Open
manonfgoo opened this issue Feb 24, 2019 · 0 comments
Open

Add lzop as compression option to CompressImage #274

manonfgoo opened this issue Feb 24, 2019 · 0 comments

Comments

@manonfgoo
Copy link

manonfgoo commented Feb 24, 2019

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant