From 253e2288992246eb62e08eeac068789056405e94 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Sat, 15 Apr 2023 20:10:59 +0200 Subject: [PATCH] Updates --- 1-install.sh | 9 +++++++++ scripts/snapshot.sh | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 scripts/snapshot.sh diff --git a/1-install.sh b/1-install.sh index f55d21f..a242d38 100755 --- a/1-install.sh +++ b/1-install.sh @@ -335,6 +335,15 @@ while true; do esac done +# ------------------------------------------------------ +# Install snapshot file +# ------------------------------------------------------ +if [ -f ~/snapshot.sh ]; then + echo "snapshot.sh exists" +else + cp ~/dotfiles/scripts/snapshot.sh ~/ +fi + # ------------------------------------------------------ # Init pywal # ------------------------------------------------------ diff --git a/scripts/snapshot.sh b/scripts/snapshot.sh new file mode 100755 index 0000000..3996bff --- /dev/null +++ b/scripts/snapshot.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# ____ _ _ +# / ___| _ __ __ _ _ __ ___| |__ ___ | |_ +# \___ \| '_ \ / _` | '_ \/ __| '_ \ / _ \| __| +# ___) | | | | (_| | |_) \__ \ | | | (_) | |_ +# |____/|_| |_|\__,_| .__/|___/_| |_|\___/ \__| +# |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +read -p "Enter a comment for the snapshot: " c +sudo timeshift --create --comments "$c" +sudo timeshift --list +sudo grub-mkconfig -o /boot/grub/grub.cfg +echo "DONE. Snapshot $c created!"