Skip to content

Commit

Permalink
Installation script bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ph3nol committed Sep 24, 2017
1 parent 6aa2307 commit cae7a3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

GITHUB_LAST_RELEASE_ENDPOINT="https://api.github.com/repos/Ph3nol/Docker-Arch/releases/tags/latest"
GITHUB_LAST_RELEASE_ENDPOINT="https://api.github.com/repos/Ph3nol/Docker-Arch/releases/latest"
DESTINATION_BIN_PATH="/usr/local/bin/docker-arch"

echo "--- Docker-Arch - Installation script ---"
Expand All @@ -12,7 +12,7 @@ then
echo "> Going to use WGET to download PHAR package."
LATEST_RELEASE_CONDITION=$(wget -S --spider "$GITHUB_LAST_RELEASE_ENDPOINT" 2>&1 | grep 'HTTP/1.1 200 OK')
if [[ $LATEST_RELEASE_CONDITION ]]; then
PHAR_DOWNLOAD_LINK=$(curl -s "$GITHUB_RELEASE_ENDPOINT" | grep browser_download_url | cut -d '"' -f 4)
PHAR_DOWNLOAD_LINK=$(curl -s "$GITHUB_LAST_RELEASE_ENDPOINT" | grep browser_download_url | cut -d '"' -f 4)
else
PHAR_DOWNLOAD_LINK="https://github.com/Ph3nol/Docker-Arch/raw/master/dist/docker-arch.phar"
fi
Expand All @@ -23,7 +23,7 @@ then
echo "> Going to use CURL to download PHAR package."
LATEST_RELEASE_CONDITION=$(curl --write-out %{http_code} --silent --output /dev/null "$GITHUB_LAST_RELEASE_ENDPOINT")
if [[ "$LATEST_RELEASE_CONDITION" == "200" ]]; then
PHAR_DOWNLOAD_LINK=$(curl -s "$GITHUB_RELEASE_ENDPOINT" | grep browser_download_url | cut -d '"' -f 4)
PHAR_DOWNLOAD_LINK=$(curl -s "$GITHUB_LAST_RELEASE_ENDPOINT" | grep browser_download_url | cut -d '"' -f 4)
else
PHAR_DOWNLOAD_LINK="https://github.com/Ph3nol/Docker-Arch/raw/master/dist/docker-arch.phar"
fi
Expand Down

0 comments on commit cae7a3c

Please sign in to comment.