diff --git a/update_arch.sh b/update_arch.sh index b41fa9f..dab8879 100755 --- a/update_arch.sh +++ b/update_arch.sh @@ -13,9 +13,9 @@ restore_latest_state() { SNAPSHOT_CREATED="" TIMESLICE_LABEL="" if pacman -Qs timeshift >/dev/null; then - TIMESLICE_INFO=$(sudo timeshift --list | awk ' + TIMESLICE_INFO=$(sudo timeshift --list | awk -F': +' ' /^Snapshot/ {snap=$2} - /^Created on/ {created=$4 " " $5} + /^Created on/ {created=$2} END { if (snap != "") { print snap "|" created } } ') if [ -n "$TIMESLICE_INFO" ]; then