From 6d1f10722705df346e8f6b4f2b85306631265e11 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Thu, 4 Feb 2021 16:15:19 +0100 Subject: [PATCH 1/4] chore: typo in readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 0fbfe1b..148f47a 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ Lists, controls and schedules efficient APFS snapshots for your convenience. # let's take space efficient APFS snapshots every hour # knowing they get cleaned up if necessary % ./macbac.sh schedule hourly -Removing previous schedule... -Removed previous snapshot schedule. Installing daemon config to /Users/user/Library/LaunchAgents/com.hazcod.macbac.plist Loading config to enable schedule... Scheduled hourly snapshots! From 12d538a08f34a5bf8d197c62b288cf0533e21502 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Thu, 4 Feb 2021 16:18:27 +0100 Subject: [PATCH 2/4] chore: fix readme typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 148f47a..b57f248 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Lists, controls and schedules efficient APFS snapshots for your convenience. ```shell # let's take space efficient APFS snapshots every hour # knowing they get cleaned up if necessary -% ./macbac.sh schedule hourly +% macbac schedule hourly Installing daemon config to /Users/user/Library/LaunchAgents/com.hazcod.macbac.plist Loading config to enable schedule... Scheduled hourly snapshots! From 3900b740f5b8f6b12efcb2dd07b62e89f78deef8 Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Thu, 4 Feb 2021 16:25:29 +0100 Subject: [PATCH 3/4] chore: add more info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b57f248..1bfe9bf 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Pruning snapshot 2021-02-04-155845 (1/1) ## How does it work? -It's a convenient wrapper around `tmutil`. +It's a convenient wrapper around `tmutil` and basically replicates the local snapshot feature Time Machine would perform when you are backing up to a remote disk. ## Installation From 2835706bef3ce78f4ac2f39d46f0837efc5f6f4a Mon Sep 17 00:00:00 2001 From: Christian Korneck Date: Sat, 13 Feb 2021 20:37:41 +0100 Subject: [PATCH 4/4] fix issue with whitespaces in volume names --- macbac.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/macbac.sh b/macbac.sh index b69d5e4..3d975be 100755 --- a/macbac.sh +++ b/macbac.sh @@ -196,7 +196,7 @@ disable() { } getVolumes() { - ls -d /Volumes/* + ls -1d /Volumes/* } getSnapshots() { @@ -222,9 +222,13 @@ listStatus() { } listSnapshots() { - volumes=$(getVolumes) + declare -a volumes - for volume in $(getVolumes); do + while read -r line; do + volumes+=("$line") + done <<< $(getVolumes) + + for volume in "${volumes[@]}"; do # show current volume echo -e "${BOLD}${volume}${NC}"