Skip to content

Commit

Permalink
fix bug with missing stable file & timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
philpennock committed Feb 17, 2018
1 parent e641c59 commit e77597a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gimme
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,10 @@ _last_mod_timestamp() {
_file_older_than_secs() {
local file="${1}"
local age_secs="${2}"
((($(date +%s) - $(_last_mod_timestamp "${file}")) > age_secs))
local ts
# if the file does not exist, we return true, as the cache needs updating
ts="$(_last_mod_timestamp "${file}" 2>/dev/null)" || return 0
((($(date +%s) - ts) > age_secs))
}

_assert_version_given() {
Expand Down

0 comments on commit e77597a

Please sign in to comment.