diff options
| -rwxr-xr-x | bin/init/sync.sh | 4 | ||||
| -rw-r--r-- | zsh/zshrc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/init/sync.sh b/bin/init/sync.sh index 413256a..a4c7542 100755 --- a/bin/init/sync.sh +++ b/bin/init/sync.sh | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | pidof git >/dev/null && exit 0 | 4 | pidof git >/dev/null && exit 0 |
| 5 | 5 | ||
| 6 | # Print information about ~/.wakeup | 6 | # Print information about ~/.wakeup |
| 7 | echo 'latest: ' $(date -d @`stat -c %Y ~/.wakeup` --iso-8601=minutes) | 7 | echo 'latest: ' $(date -d @`stat -c %Y ~/.wakeup` --iso-8601=seconds) |
| 8 | echo 'wakeup at: ' $(cat ~/.wakeup | xargs -i date -d @{} --iso-8601=minutes) | 8 | echo 'wakeup at: ' $(cat ~/.wakeup | xargs -i date -d @{} --iso-8601=seconds) |
| 9 | 9 | ||
| 10 | # Sync a repo | 10 | # Sync a repo |
| 11 | sync() { | 11 | sync() { |
| @@ -49,7 +49,7 @@ function _get_context() { | |||
| 49 | 49 | ||
| 50 | function _already_sync_after_wakeup() { | 50 | function _already_sync_after_wakeup() { |
| 51 | latest=$(date -d @`stat -c %Y ~/.wakeup` +%s) | 51 | latest=$(date -d @`stat -c %Y ~/.wakeup` +%s) |
| 52 | if [ $latest -ge $(cat ~/.wakeup) ]; then | 52 | if [ $latest -gt $(cat ~/.wakeup) ]; then |
| 53 | return 0 | 53 | return 0 |
| 54 | else | 54 | else |
| 55 | return 1 | 55 | return 1 |