From e93385332e34d3c41f8b4b7fb495374fbf554bd2 Mon Sep 17 00:00:00 2001 From: Zi1mo5zo Date: Thu, 22 Nov 2018 08:21:37 +0100 Subject: [PATCH] Added dep check w/wget --- ipfs-wormhole.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ipfs-wormhole.sh b/ipfs-wormhole.sh index 729c6c5..fe818a1 100755 --- a/ipfs-wormhole.sh +++ b/ipfs-wormhole.sh @@ -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 @@ -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 @@ -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 ;;