summaryrefslogtreecommitdiff
path: root/tools/check_for_upgrade.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/check_for_upgrade.sh')
-rw-r--r--tools/check_for_upgrade.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index 35e074297..b2b356e0c 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -1,7 +1,9 @@
-#!/bin/sh
+#!/usr/bin/env zsh
+
+zmodload zsh/datetime
function _current_epoch() {
- echo $(($(date +%s) / 60 / 60 / 24))
+ echo $(( $EPOCHSECONDS / 60 / 60 / 24 ))
}
function _update_zsh_update() {
@@ -20,8 +22,6 @@ if [[ -z "$epoch_target" ]]; then
epoch_target=13
fi
-[ -f ~/.profile ] && source ~/.profile
-
# Cancel upgrade if the current user doesn't have write permissions for the
# oh-my-zsh directory.
[[ -w "$ZSH" ]] || return 0