From 6aa9d0d94fa381d2316303bf2e61edd3c2760356 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 2 Apr 2020 16:12:34 -0400 Subject: [PATCH] Automatically compress images after generation. --- build/build/build.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/build/build.sh b/build/build/build.sh index 2910523..0d6e209 100755 --- a/build/build/build.sh +++ b/build/build/build.sh @@ -274,9 +274,11 @@ fi # Once all scripts have completed, come back to the directory from which this script was launched. cd $current && echo "cd $current" |& log -newrootsize=$(ls -hs "${imagename}" | cut -f1 -d' ') -relativeimage=$(realpath --relative-to="$PWD" "$imagename") -echo "$relativeimage was built successfully" | log -echo "Size of $relativeimage is ${newrootsize}" | log +relativeImage=$(realpath --relative-to="$PWD" "$imagename") +echo "Compressing $relativeImage" | log +xz -T0 -M 512M --verbose "$relativeImage" | log +echo "$relativeImage was built successfully" | log +newrootsize=$(ls -hs "${imagename}.xz" | cut -f1 -d' ') +echo "Size of ${relativeImage}.xz is ${newrootsize}" | log exit 0