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 37a0fa8 commit 630361a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,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
6 changes: 1 addition & 5 deletions tests/12_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,15 @@
@depends_on run_selfupdate

@goal wget_prepared
# set -x
cmd="wget"
# echo "$cmd1 :: $?"
(
echo "#!/bin/bash"
echo 'echo "running wget"'
if cmd1=`command -v $cmd 2>/dev/null`
if cmd1=`command -v $cmd`
then
echo "exec $cmd1 \"\$@\""
else
# fake wget with curl
# echo "set -x"
# echo 'echo "1=$1 2=$2 3=$3"'
echo "exec $(command -v curl) \"\${1/-q/-s}\" \"\$2\" \"\${3/-O/-o}\""
fi
) > "$D/$cmd"
Expand Down

0 comments on commit 630361a

Please sign in to comment.