aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmkrootfs.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/mkrootfs.sh b/mkrootfs.sh
index db59291..a65d2aa 100755
--- 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!"