Skip to content

Commit 87e4e46

Browse files
committed
Add checks for tar and curl binaries
1 parent b00ade9 commit 87e4e46

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

get.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
# set -x
33
set -eo pipefail
44

5+
if ! [ -x "$(command -v curl)" ]; then
6+
echo 'Error: curl is not installed.' >&2
7+
exit 1
8+
fi
9+
10+
if ! [ -x "$(command -v tar)" ]; then
11+
echo 'Error: curl is not installed.' >&2
12+
exit 1
13+
fi
14+
515
BINARY_NAME="hashnode"
616
HOST_OS=${HOST_OS:-$(uname | tr '[:upper:]' '[:lower:]')}
717

0 commit comments

Comments
 (0)