aboutsummaryrefslogtreecommitdiff
path: root/scripts/snap-btrfs.sh
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2024-01-20 12:31:58 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2024-01-20 12:31:58 -0500
commite2a0cf2a79b43f9f86b74270f3d96fe300687804 (patch)
treea87edf55f81e78f4d0968d6f006562090260e068 /scripts/snap-btrfs.sh
parentec83443853116b07f18fbef8c6de31cf157939a0 (diff)
downloaddotfiles-e2a0cf2a79b43f9f86b74270f3d96fe300687804.tar.gz
dotfiles-e2a0cf2a79b43f9f86b74270f3d96fe300687804.tar.xz
Cleanup unused files and code.
Diffstat (limited to 'scripts/snap-btrfs.sh')
-rwxr-xr-xscripts/snap-btrfs.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/scripts/snap-btrfs.sh b/scripts/snap-btrfs.sh
deleted file mode 100755
index cc2e5a9..0000000
--- a/scripts/snap-btrfs.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-set -x
-set -e
-timestamp() {
- date +%m.%d.%y_%H.%M.%S
-}
-
-rootfs="glibc"
-snap="${rootfs}-snap"
-
-cd /ROOT
-
-if [ -e "$snap" ] ; then
- btrfs sub del "$snap"
-fi
-
-if ! [ -e "bak" ] ; then
- btrfs sub create "bak"
-fi
-
-btrfs sub snap -r "$rootfs" "bak/${rootfs}-$(timestamp)"
-btrfs sub snap "$rootfs" "$snap"
-sed -i.bak -e"s/subvol=${rootfs}/subvol=${snap}/g" "${snap}/etc/fstab"