Skip to content

Commit

Permalink
fix install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mufeez-amjad committed Dec 29, 2022
1 parent 4815517 commit 9cf6ece
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ main() {

unset exe

if [ ! -d "$BIN_DIR" ]; then
mkdir -p "$BIN_DIR"
fi

echo "Downloading latest binary from $BINARY_URL to $BIN_DIR"
if [[ "$PLATFORM" == "windows" ]]; then
ensure curl -L "$BINARY_URL" -o "$BIN_DIR/avail.zip"
unzip "$BIN_DIR/avail.zip" -d "$BIN_DIR"
rm "$BIN_DIR/avail.zip"
exe = ".exe"
else
ensure curl -L "$BINARY_URL" | tar -xJ -C "$BIN_DIR"
ensure curl -L "$BINARY_URL" | tar -xJ -C "$BIN_DIR" --strip-components 1
fi

if [ ! -f "$BIN_DIR/avail$exe" ]; then
Expand Down

0 comments on commit 9cf6ece

Please sign in to comment.