Skip to content

Commit

Permalink
Added dep check w/wget
Browse files Browse the repository at this point in the history
  • Loading branch information
Zi1mo5zo committed Nov 22, 2018
1 parent 6002fcd commit e933853
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ipfs-wormhole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ PWGENCMD="$(command -v pwgen)"
TARCMD="$(command -v tar)"
GPGCMD="$(command -v gpg)"
IPFSCMD="$(command -v ipfs)"
WGETCMD="$(command -v wget)"
set +e

ERROR=0
Expand All @@ -39,6 +40,10 @@ if [ -z "$IPFSCMD" ]; then
echo ipfs not found
ERROR=1
fi
if [ -z "$WGETCMD" ]; then
echo wget not found
ERROR=1
fi

[ "$ERROR" -eq 1 ] && exit 1

Expand Down Expand Up @@ -88,7 +93,7 @@ receive)
;;
update)
echo Update...
wget -O "${0:-}" \
$WGETCMD -O "${0:-}" \
https://raw.githubusercontent.com/aurelg/ipfs-wormhole/master/ipfs-wormhole.sh
exit 0
;;
Expand Down

0 comments on commit e933853

Please sign in to comment.