diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-07-11 09:51:46 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-07-11 09:51:46 +0800 |
commit | dda043def4ded78157919e52136f2a353ae0d519 (patch) | |
tree | 4e61b1a0c05f3a16618ff3866f8f359a660df2ea /zsh | |
parent | 4d32f63efbfc776be01ea9525f5ccff21aca2051 (diff) |
Update
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/zshrc | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -48,10 +48,11 @@ function _get_context() { | |||
48 | } | 48 | } |
49 | 49 | ||
50 | function _already_sync_after_wakeup() { | 50 | function _already_sync_after_wakeup() { |
51 | WAKEUP="~/.wakeup" | 51 | WAKEUP="$HOME/.wakeup" |
52 | [ ! -e "$WAKEUP" ] && return 0 | 52 | [ ! -e "$WAKEUP" ] && return 0 |
53 | 53 | ||
54 | latest=$(date -d @`stat -c %Y "$WAKEUP` +%s) | 54 | latest=$(date -d @`stat -c %X "$WAKEUP"` +%s) |
55 | # If sync time is older than wakeup time (timestamp in file), then return false | ||
55 | if [ $latest -gt $(cat "$WAKEUP") ]; then | 56 | if [ $latest -gt $(cat "$WAKEUP") ]; then |
56 | return 0 | 57 | return 0 |
57 | else | 58 | else |