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 9fd281b commit 37a0fa8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/12_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,20 @@
@depends_on run_selfupdate

@goal wget_prepared
set -x
# set -x
cmd="wget"
cmd1=`command -v $cmd 2>/dev/null`
echo "$cmd1 :: $?"
# echo "$cmd1 :: $?"
(
echo "#!/bin/bash"
echo 'echo "running wget"'
if [[ -z $cmd1 ]]
if cmd1=`command -v $cmd 2>/dev/null`
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}\""
else
echo "exec $cmd1 \"\$@\""
fi
) > "$D/$cmd"
chmod +x "$D/$cmd"
Expand Down

0 comments on commit 37a0fa8

Please sign in to comment.