Skip to content

Commit

Permalink
chore: more portable install script with shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBeucher committed May 11, 2024
1 parent 4829bba commit 911127f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
cachix
python311
python311Packages.pip
shellcheck

# Module testing
podman
Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ CHECKSUM_URL="https://github.com/PierreBeucher/novops/releases/latest/download/$

echo "Downloading Novops release..."

mkdir -p $TMP_INSTALL_DIR
mkdir -p "$TMP_INSTALL_DIR"
curl -s -L "${ZIP_URL}" -o "${ZIP_PATH}"
curl -s -L "${CHECKSUM_URL}" -o "${CHECKSUM_PATH}"

Expand All @@ -172,11 +172,11 @@ fi
# Only need sudo to copy to install dir
if [ "$(id -u)" -eq 0 ]; then
echo "Copying to ${INSTALL_DIR}..."
mkdir -p $INSTALL_DIR
mkdir -p "$INSTALL_DIR"
mv "${NOVOPS_BIN_TMP_PATH}" "${INSTALL_DIR}"
else
echo "Copying to ${INSTALL_DIR}... (you may be prompted for sudo password)"
sudo mkdir -p $INSTALL_DIR
sudo mkdir -p "$INSTALL_DIR"
sudo mv "${NOVOPS_BIN_TMP_PATH}" "${INSTALL_DIR}"
fi

Expand Down

0 comments on commit 911127f

Please sign in to comment.