summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoinak Ghosh <moinakg@gmail.com>2014-09-17 11:11:48 +0530
committerMoinak Ghosh <moinakg@gmail.com>2014-09-17 11:11:48 +0530
commit90762eee49efcdfd6b92ad5d5d9e5f43d113ae0b (patch)
tree201275daf8e9013941f0f90276cebad80bf0f871
parent5f38a537cef0d79c9d53c01e8f88d150e985c70a (diff)
downloadzsh-90762eee49efcdfd6b92ad5d5d9e5f43d113ae0b.tar.gz
zsh-90762eee49efcdfd6b92ad5d5d9e5f43d113ae0b.tar.bz2
zsh-90762eee49efcdfd6b92ad5d5d9e5f43d113ae0b.zip
Convert epoch_target from days to seconds.
-rw-r--r--tools/check_for_upgrade.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index 0e8845ab4..f49bb151f 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -22,6 +22,8 @@ if [[ -z "$epoch_target" ]]; then
epoch_target=13
fi
+epoch_target_seconds=$((epoch_target * 86400))
+
[ -f ~/.profile ] && source ~/.profile
# Cancel upgrade if the current user doesn't have write permissions for the
@@ -37,7 +39,7 @@ then
fi
epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
- if [ $epoch_diff -gt $epoch_target ]
+ if [ $epoch_diff -gt $epoch_target_seconds ]
then
if [ "$DISABLE_UPDATE_PROMPT" = "true" ]
then