mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Use parallel gzip in box creation if available
This can speed up box creation significantly on modern machines.
This commit is contained in:
parent
0f037bab9b
commit
2f41402c9a
@ -118,7 +118,12 @@ EOF
|
||||
|
||||
echo "==> Creating box, tarring and gzipping"
|
||||
|
||||
tar cvzf "$BOX" -S --totals ./metadata.json ./Vagrantfile ./box.img
|
||||
if type pigz >/dev/null 2>/dev/null; then
|
||||
GZ="pigz"
|
||||
else
|
||||
GZ="gzip"
|
||||
fi
|
||||
tar cv -S --totals ./metadata.json ./Vagrantfile ./box.img | $GZ -c > "$BOX"
|
||||
|
||||
# if box is in tmpdir move it to CWD before removing tmpdir
|
||||
if ! isabspath "$BOX"; then
|
||||
|
Loading…
Reference in New Issue
Block a user