From 5e695db2a3626ade0e4705a8e572b1035123bff1 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 2 Feb 2025 15:03:23 +0300 Subject: [PATCH] cleanup and fixes... Signed-off-by: Alex A. Naanou --- Archive/snapshot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Archive/snapshot.sh b/Archive/snapshot.sh index b95ea137..e63b36c4 100755 --- a/Archive/snapshot.sh +++ b/Archive/snapshot.sh @@ -29,7 +29,7 @@ fi # check if on btrfs filesystem... # XXX also check if btrfs command is available... -if ! btrfs filesystem usage . > /dev/null ; then +if ! btrfs filesystem usage . > /dev/null 2>&1 ; then exit fi @@ -49,7 +49,7 @@ if ! [ -e "$SUBVOLUME_DIR" ] ; then # XXX build tree -- ImageGrid # convert ./media to a subvolume... -elif [ "$(stat --format=%i "$SUBVOLUME_DIR")" == 256 ] ; then +elif ! [ "$(stat --format=%i "$SUBVOLUME_DIR")" == 256 ] ; then mkdir bak mv "$SUBVOLUME_DIR" bak/ btrfs subvolume create "$SUBVOLUME_DIR"