libdevuansdk

common library for devuan's simple distro kits
git clone https://git.parazyd.org/libdevuansdk
Log | Files | Refs | Submodules | README | LICENSE

commit ceb7259fd94b15dfc55c329d4f9f093940d51ad0
parent 601ce7590376d6774f34bbadb0009b62652b969d
Author: parazyd <parazyd@dyne.org>
Date:   Tue, 16 Jan 2018 13:04:08 +0100

Separate tarring of the strapdir into its own func.

Diffstat:
Mzlibs/imaging | 12++++++++++++
Mzlibs/rsync | 3+--
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/zlibs/imaging b/zlibs/imaging @@ -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 +} diff --git a/zlibs/rsync b/zlibs/rsync @@ -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 || {