From 74961e18f5807d498327f925c53e586d8e3d86f1 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 19 Jun 2023 10:56:34 +0800 Subject: Update --- bin/init/sync.sh | 4 ++-- 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 @@ pidof git >/dev/null && exit 0 # Print information about ~/.wakeup -echo 'latest: ' $(date -d @`stat -c %Y ~/.wakeup` --iso-8601=minutes) -echo 'wakeup at: ' $(cat ~/.wakeup | xargs -i date -d @{} --iso-8601=minutes) +echo 'latest: ' $(date -d @`stat -c %Y ~/.wakeup` --iso-8601=seconds) +echo 'wakeup at: ' $(cat ~/.wakeup | xargs -i date -d @{} --iso-8601=seconds) # Sync a repo sync() { diff --git a/zsh/zshrc b/zsh/zshrc index 2074cc0..d8043c6 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -49,7 +49,7 @@ function _get_context() { function _already_sync_after_wakeup() { latest=$(date -d @`stat -c %Y ~/.wakeup` +%s) - if [ $latest -ge $(cat ~/.wakeup) ]; then + if [ $latest -gt $(cat ~/.wakeup) ]; then return 0 else return 1 -- cgit v1.2.3-70-g09d2