Skip to content

Commit

Permalink
Is it possible to make ./makesure --selfupdate to work on Win? #22
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Aug 6, 2021
1 parent 630361a commit a6d4c30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,7 @@ function currentTimeMillis( script, res) {
}

function selfUpdate( url, tmp, err, newVer) {
# url = "https://raw.githubusercontent.com/xonixx/makesure/main/makesure_stable?" rand()
url = "https://raw.githubusercontent.com/xonixx/makesure/win/makesure_stable?" rand()
url = "https://raw.githubusercontent.com/xonixx/makesure/main/makesure_stable?" rand()
tmp = executeGetLine("mktemp /tmp/makesure_new.XXXXXXXXXX")
err = dl(url, tmp)
if (!err && !ok("chmod +x " tmp)) err = "can't chmod +x " tmp
Expand Down
5 changes: 2 additions & 3 deletions makesure_stable
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ function currentTimeMillis( script, res) {
}
function selfUpdate( url, tmp, err, newVer) {
# url = "https://raw.githubusercontent.com/xonixx/makesure/main/makesure_stable?" rand()
url = "https://raw.githubusercontent.com/xonixx/makesure/win/makesure_stable?" rand()
url = "https://raw.githubusercontent.com/xonixx/makesure/main/makesure_stable?" rand()
tmp = executeGetLine("mktemp /tmp/makesure_new.XXXXXXXXXX")
err = dl(url, tmp)
if (!err && !ok("chmod +x " tmp)) err = "can'\''t chmod +x " tmp
Expand Down Expand Up @@ -559,7 +558,7 @@ function addL(s, l) { return s ? s "\n" l : l }
function arrPush(arr, elt) { arr[arr[-7]++] = elt }
function arrLen(arr) { return 0 + arr[-7] }
function arrLast(arr) { return arr[arrLen(arr)-1] }
function commandExists(cmd) { return ok("command -v " cmd " >/dev/null 2>&1") }
function commandExists(cmd) { return ok("command -v " cmd " >/dev/null") }
function ok(cmd) { return system(cmd) == 0 }
function isFile(path) { return ok("test -f " quoteArg(path)) }
function isDir(path) { return ok("test -d " quoteArg(path)) }
Expand Down

0 comments on commit a6d4c30

Please sign in to comment.