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
|
# Create backup/snapshot
|
||||||
if pacman -Qs timeshift >/dev/null; then
|
if pacman -Qs timeshift >/dev/null; then
|
||||||
printf -- '\033[33m Creating backup/snapshot\n\033[37m'
|
CONFIG_FILE="/etc/timeshift/timeshift.json"
|
||||||
sudo timeshift --create --comments "Update script" --tags O
|
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
|
fi
|
||||||
|
|
||||||
# Update all pacman packages
|
# Update all pacman packages
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user