diff options
| -rw-r--r-- | zsh/zshrc | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -48,8 +48,11 @@ function _get_context() { | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | function _already_sync_after_wakeup() { | 50 | function _already_sync_after_wakeup() { |
| 51 | latest=$(date -d @`stat -c %Y ~/.wakeup` +%s) | 51 | WAKEUP=~/.wakeup |
| 52 | if [ $latest -gt $(cat ~/.wakeup) ]; then | 52 | [ ! -e "$WAKEUP" ] && return 0 |
| 53 | |||
| 54 | latest=$(date -d @`stat -c %Y "$WAKEUP` +%s) | ||
| 55 | if [ $latest -gt $(cat "$WAKEUP") ]; then | ||
| 53 | return 0 | 56 | return 0 |
| 54 | else | 57 | else |
| 55 | return 1 | 58 | return 1 |