Producing rsyncable tarballs where possible.
This commit is contained in:
parent
e98676f6b3
commit
705cb6cec1
|
@ -78,7 +78,14 @@ case "${LH_NET_TARBALL}" in
|
|||
;;
|
||||
|
||||
gzip)
|
||||
if gzip --help | grep -q "\-\-rsyncable"
|
||||
then
|
||||
tar cf binary-net.tar "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
|
||||
gzip --rsyncable --best binary-net.tar
|
||||
else
|
||||
tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
|
||||
fi
|
||||
|
||||
mv binary-net.tar.gz "${OLDPWD}"
|
||||
;;
|
||||
|
||||
|
|
|
@ -50,7 +50,13 @@ Create_lockfile .lock
|
|||
# Remove old binary
|
||||
rm -f binary.tar.gz
|
||||
|
||||
tar cfz binary-tar.tar.gz binary
|
||||
if gzip --help | grep -q '\-\-rsyncable'
|
||||
then
|
||||
tar cf binary-tar.tar binary
|
||||
gzip --rsyncable --best binary-tar.tar
|
||||
else
|
||||
tar cfz binary-tar.tar.gz binary
|
||||
fi
|
||||
|
||||
# Creating stage file
|
||||
Create_stagefile .stage/binary_tar
|
||||
|
|
|
@ -59,7 +59,15 @@ cp -a config source/debian-live
|
|||
|
||||
# Create tarball
|
||||
cd source
|
||||
tar cfz debian-live-config_$(date +%Y%m%d.%s).tar.gz debian-live
|
||||
|
||||
if gzip --help | grep -q '\-\-rsyncable'
|
||||
then
|
||||
tar cf debian-live-config_$(date +%Y%m%d.%s).tar debian-live
|
||||
gzip --rsyncable --best debian-live-config_$(date +%Y%m%d.%s).tar
|
||||
else
|
||||
tar cfz debian-live-config_$(date +%Y%m%d.%s).tar.gz debian-live
|
||||
fi
|
||||
|
||||
cd "${OLDPWD}"
|
||||
|
||||
rm -rf source/debian-live/config
|
||||
|
|
|
@ -59,7 +59,13 @@ then
|
|||
fi
|
||||
|
||||
# Create tarball
|
||||
tar cfz source-net.tar.gz source
|
||||
if gzip --help | grep -q '\-\-rsyncable'
|
||||
then
|
||||
tar cf source-net.tar source
|
||||
gzip --rsyncable --best source-net.tar
|
||||
else
|
||||
tar cfz source-net.tar.gz source
|
||||
fi
|
||||
|
||||
# Creating stage file
|
||||
Create_stagefile .stage/source_net
|
||||
|
|
|
@ -60,7 +60,13 @@ then
|
|||
fi
|
||||
|
||||
# Create tarball
|
||||
tar cfz source.tar.gz source
|
||||
if gzip --help | grep -q '\-\-rsyncable'
|
||||
then
|
||||
tar cf source.tar source
|
||||
gzip --rsyncable --best source.tar
|
||||
else
|
||||
tar cfz source.tar.gz source
|
||||
fi
|
||||
|
||||
# Creating stage file
|
||||
Create_stagefile .stage/source_tar
|
||||
|
|
Loading…
Reference in New Issue