From dda043def4ded78157919e52136f2a353ae0d519 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 11 Jul 2023 09:51:46 +0800 Subject: Update --- zsh/zshrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index 19227cd..05d3e9e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -48,10 +48,11 @@ function _get_context() { } function _already_sync_after_wakeup() { - WAKEUP="~/.wakeup" + WAKEUP="$HOME/.wakeup" [ ! -e "$WAKEUP" ] && return 0 - latest=$(date -d @`stat -c %Y "$WAKEUP` +%s) + latest=$(date -d @`stat -c %X "$WAKEUP"` +%s) + # If sync time is older than wakeup time (timestamp in file), then return false if [ $latest -gt $(cat "$WAKEUP") ]; then return 0 else -- cgit v1.2.3-70-g09d2