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.
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user