Skip to content

Commit

Permalink
Add a directory permission check in install.sh (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
moshiurH authored Nov 18, 2024
1 parent 73d3ecb commit 3e77fe6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
INSTALL_DIR=/usr/local/bin
REPO_URL="https://github.com/mirantiscontainers/blueprint"

# Check if there is sufficient permission for the binary download to succeed later in the script
touch testfile
if [[ $? -ne 0 ]]
then
echo "Unable to write to directory: $(pwd)"
echo "Change to a directory with sufficient permissions and retry."
exit 1
fi
rm testfile

# Determine the version
if [[ ! -n $VERSION ]]
then
Expand Down

0 comments on commit 3e77fe6

Please sign in to comment.