Skip to content

Commit

Permalink
Update install script to ensure install dir exists (rilldata#1633)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspersjo authored Jan 19, 2023
1 parent 68f7323 commit a67052f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,12 @@ downloadBinary() {
unzip -q rill_${PLATFORM}.zip
}

# Install the binary and ask for elevated permissions if needed
# Ask for elevated permissions to install the binary
installBinary() {
INSTALL_DIR="/usr/local/bin"
if [ -w "${INSTALL_DIR}" ]; then
printf "\nInstalling the Rill binary to: ${INSTALL_DIR}/rill\n"
install rill "${INSTALL_DIR}/"
else
printf "\nElevated permissions required to install the Rill binary to: ${INSTALL_DIR}/rill\n"
sudo install rill "${INSTALL_DIR}/"
fi
printf "\nElevated permissions required to install the Rill binary to: ${INSTALL_DIR}/rill\n"
sudo install -d ${INSTALL_DIR}
sudo install rill "${INSTALL_DIR}/"
}

# Run the installed binary and print the version
Expand Down

0 comments on commit a67052f

Please sign in to comment.