Fixed snapshot script
This commit is contained in:
parent
b6ff30b80c
commit
aa317f774e
@ -16,8 +16,14 @@ echo -e ' \e[H\e[2J
|
||||
'
|
||||
# Create backup/snapshot
|
||||
if pacman -Qs timeshift >/dev/null; then
|
||||
printf -- '\033[33m Creating backup/snapshot\n\033[37m'
|
||||
sudo timeshift --create --comments "Update script" --tags O
|
||||
CONFIG_FILE="/etc/timeshift/timeshift.json"
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
BTRFS_MODE=$(jq '.btrfs_mode' "$CONFIG_FILE")
|
||||
if [ "$BTRFS_MODE" == '"true"' ]; then
|
||||
printf -- '\033[33m Creating backup/snapshot\n\033[37m'
|
||||
sudo timeshift --create --comments "Update script"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update all pacman packages
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user