Automatically compress images after generation.
This commit is contained in:
parent
bda6672204
commit
6aa9d0d94f
@ -274,9 +274,11 @@ fi
|
|||||||
# Once all scripts have completed, come back to the directory from which this script was launched.
|
# Once all scripts have completed, come back to the directory from which this script was launched.
|
||||||
cd $current && echo "cd $current" |& log
|
cd $current && echo "cd $current" |& log
|
||||||
|
|
||||||
newrootsize=$(ls -hs "${imagename}" | cut -f1 -d' ')
|
relativeImage=$(realpath --relative-to="$PWD" "$imagename")
|
||||||
relativeimage=$(realpath --relative-to="$PWD" "$imagename")
|
echo "Compressing $relativeImage" | log
|
||||||
echo "$relativeimage was built successfully" | log
|
xz -T0 -M 512M --verbose "$relativeImage" | log
|
||||||
echo "Size of $relativeimage is ${newrootsize}" | 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
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user