fix date
This commit is contained in:
parent
56b7a28133
commit
f976e263e5
@ -57,13 +57,6 @@ function ozsh_update {
|
||||
function ozsh_autoupdate {
|
||||
local timediff=$(( ( $(strftime -r %Y-%m-%d $(date +%Y-%m-%d)) - $(strftime -r %Y-%m-%d $(cat $OZSH_LASTUPDATE_FILE)) ) / 86400 ))
|
||||
|
||||
echo "last cmd is $?"
|
||||
|
||||
if [ ! $? -eq 0 ]; then
|
||||
# recreate the file if the command fails
|
||||
ozsh_write_update_date
|
||||
fi
|
||||
|
||||
if [ "$timediff" -ge "7" ]; then
|
||||
vared -p 'Would you like to update ozsh? [y/N]: ' -c answer
|
||||
if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user