Separate tarring of the strapdir into its own func.
This commit is contained in:
parent
601ce75903
commit
ceb7259fd9
|
|
@ -253,3 +253,15 @@ image_qcow2_as_strapdir() {
|
||||||
echo 1 | sudo tee ${strapdir}/.keep >/dev/null
|
echo 1 | sudo tee ${strapdir}/.keep >/dev/null
|
||||||
popd
|
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
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,7 @@ rsync_to_raw_image() {
|
||||||
|
|
||||||
mkdir -p $R/dist
|
mkdir -p $R/dist
|
||||||
pushd $strapdir
|
pushd $strapdir
|
||||||
notice "creating a tarbomb of the rootfs..."
|
tar_strapdir || zerr
|
||||||
sudo tar czf "$R/dist/${image_name}.tar.gz" . || zerr
|
|
||||||
|
|
||||||
notice "rsyncing strapdir to raw image..."
|
notice "rsyncing strapdir to raw image..."
|
||||||
sudo rsync -HPavz -q ./* $workdir/mnt || {
|
sudo rsync -HPavz -q ./* $workdir/mnt || {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue