Skip to content

Commit

Permalink
selfupdate is broken #174 : switch to increment strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Dec 22, 2024
1 parent ebc933a commit d3d1c8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@define NEXT_VERSION '0.9.23'
@define GOAWK_VERSION '1.29.1' # https://github.com/benhoyt/goawk/releases
@define JUST_VERSION '1.3.0' # https://github.com/casey/just/releases
@define FHTAGN_VERSION 'v0.2.0' # https://github.com/xonixx/fhtagn/releases
@define FHTAGN_VERSION 'v0.2.1' # https://github.com/xonixx/fhtagn/releases
@define MDBOOK_VERSION 'v0.4.37' # https://github.com/rust-lang/mdBook/releases
@define MDBOOK_LINKCHECK_VERSION 'v0.7.7' # https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases
@define MDBOOKER_VERSION '11572b1' # https://github.com/xonixx/mdbooker/releases
Expand Down
9 changes: 7 additions & 2 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,16 @@ function selfUpdate( tmp, err, newVer,line,good,i,found) {
err = "can't check the dl result"
break
}
print "LINE: " line
if (line ~ /^404/) {
if (found) {
if (!err && !ok("chmod +x " good)) err = "can't chmod +x " good
if (!err) print "updated " Version " -> " executeGetLine(good " -v")
if (!err) {
newVer = executeGetLine(good " -v")
if (!ok("cp " good " " quoteArg(Prog)))
err = "can't overwrite " Prog
else
print "updated " Version " -> " newVer
}
} else print "you have latest version " Version " installed"
break
}
Expand Down

0 comments on commit d3d1c8d

Please sign in to comment.