]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use zopfli to further compress source archives, when available.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 15 May 2019 21:07:55 +0000 (17:07 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 15 May 2019 21:07:55 +0000 (17:07 -0400)
scripts/makesrcdist

index 1ef0442ec1734e8b178cbbbb0f1b70f1c914297c..33b2f37cc69d7ff73f5ce61a02db0a415b1c97a7 100755 (executable)
@@ -83,7 +83,7 @@ else
 fi
 
 fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
-file="cups-$fileversion-source.tar.gz"
+file="$HOME/cups-$fileversion-source.tar"
 
 echo Exporting $fileversion...
 rm -rf $TMPDIR/cups-$version
@@ -100,15 +100,23 @@ rm -rf .gitignore
 cd ..
 
 echo Archiving...
-tar czf $file cups-$version
+tar cf $file cups-$version
+
+echo Compressing...
+if (which zopfli >/dev/null); then
+       zopfli $file
+       rm -f $file
+else
+       gzip -v9 $file
+fi
 
 if test $SIGNFILES = yes; then
        echo Signing...
-       test -f $file.sig && rm -f $file.sig
-       gpg --detach-sign -u security@cups.org $file
+       test -f $file.gz.sig && rm -f $file.gz.sig
+       gpg --detach-sign -u security@cups.org $file.gz
 fi
 
 echo Removing temporary files...
 rm -rf cups-$version
 
-echo "Done - files in $TMPDIR."
+echo "Done - files in $HOME."