mkrootfs

Carbs rootfs generator
git clone git://git.carbslinux.org/mkrootfs
Log | Files | Refs | README | LICENSE

commit baa1cfb1e2f9a3d9443c481028f9499bcfbe6e93
parent a66138085195d4c9f2b7a9b33c34f983e7afcc5f
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 13 May 2020 03:19:29 +0300

change directory in a subshell

Diffstat:
Mmkrootfs.sh | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mkrootfs.sh b/mkrootfs.sh @@ -91,7 +91,8 @@ msg "Removing root cache" rm -rf "$MNTDIR/root/.cache" msg "Generating rootfs to $BASEDIR" -cd "$MNTDIR" || die "Could not change directory to $MNTDIR" -tar -cpvJf "$BASEDIR/carbs-rootfs-$(date +%Y%m%d).tar.xz" . -cd "$BASEDIR" || die "Could not change directory to $BASEDIR" +( + cd "$MNTDIR" || die "Could not change directory to $MNTDIR" + tar -cpvJf "$BASEDIR/carbs-rootfs-$(date +%Y%m%d)-$(uname -m).tar.xz" . +) msg "Done!"