Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Update install.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
containerscrew committed Nov 17, 2023
1 parent 338d87d commit cd53301
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ happyexit(){
echo ""
echo "Now run:"
echo ""
echo " ${PROJECT} usage"
echo " ${PROJECT} --help"
echo ""
exit 0
}
Expand Down Expand Up @@ -98,10 +98,11 @@ download_release() {
INSTALLATION_PATH="/usr/local/bin/"
tmpdir=$(mktemp -d)

cd $tmpdir
cd "$tmpdir"
echo -e "Downloading... ${LATEST_VERSION}/${PROJECT}-${OS}-${cli_arch}.zip \n"
curl -L --fail --remote-name-all https://github.com/containerscrew/${PROJECT}/releases/download/"${LATEST_VERSION}"/${PROJECT}-${OS}-${cli_arch}.zip
unzip ${PROJECT}-${OS}-${cli_arch}.zip ${PROJECT}
# shellcheck disable=SC2086
curl -L --fail --remote-name-all https://github.com/containerscrew/${PROJECT}/releases/download/"${LATEST_VERSION}"/${PROJECT}-"${OS}"-${cli_arch}.zip
unzip ${PROJECT}-"${OS}"-"${cli_arch}".zip ${PROJECT}
}

# Start install
Expand All @@ -110,8 +111,10 @@ download_release
if [ "$EUID" -ne 0 ]
then command_exists sudo
sudo mv ${PROJECT} $INSTALLATION_PATH
sudo chown root: /usr/local/bin/${PROJECT}
else
mv ${PROJECT} $INSTALLATION_PATH
chown root: /usr/local/bin/${PROJECT}
chmod +x $INSTALLATION_PATH/${PROJECT}
fi

Expand Down

0 comments on commit cd53301

Please sign in to comment.