Separate tarring of the strapdir into its own func.

This commit is contained in:
parazyd 2018-01-16 13:04:08 +01:00
parent 601ce75903
commit ceb7259fd9
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
2 changed files with 13 additions and 2 deletions

View File

@ -253,3 +253,15 @@ image_qcow2_as_strapdir() {
echo 1 | sudo tee ${strapdir}/.keep >/dev/null
popd
}
tar_strapdir() {
fn tar_strapdir
req=(strapdir)
ckreq || return 1
notice "creating a tarbomb of the rootfs..."
silly
pushd "$strapdir"
tar czf "$R/dist/${image_name}.tar.gz" . || zerr
popd
}

View File

@ -30,8 +30,7 @@ rsync_to_raw_image() {
mkdir -p $R/dist
pushd $strapdir
notice "creating a tarbomb of the rootfs..."
sudo tar czf "$R/dist/${image_name}.tar.gz" . || zerr
tar_strapdir || zerr
notice "rsyncing strapdir to raw image..."
sudo rsync -HPavz -q ./* $workdir/mnt || {