fix(install): Enhance checks and code
- Opengrep complains about non quoted strings - Bad indentation fixed
This commit is contained in:
@@ -35,8 +35,8 @@ if [ -z "$INSTALL_PATH" ]; then
|
||||
fi
|
||||
|
||||
# ensure that $INSTALL_PATH is in the PATH
|
||||
if ! echo $PATH | grep -q $INSTALL_PATH; then
|
||||
echo "Sorry, $INSTALL_PATH is not in the PATH"
|
||||
if ! echo "$PATH" | grep -q "$INSTALL_PATH"; then
|
||||
echo "Sorry, ${INSTALL_PATH} is not in the PATH"
|
||||
echo "Please, add it to your PATH in your shell configuration file"
|
||||
echo "then restart your shell and run this script again"
|
||||
exit 1
|
||||
@@ -58,8 +58,8 @@ echo "Downloading $BIN_URL"
|
||||
T=$(mktemp -u)
|
||||
curl -SL -# $BIN_URL -o $T || (echo "Failed to download katenary" && rm -f $T && exit 1)
|
||||
|
||||
mv $T $INSTALL_PATH/katenary
|
||||
chmod +x $INSTALL_PATH/katenary
|
||||
mv "$T" "${INSTALL_PATH}/katenary"
|
||||
chmod +x "${INSTALL_PATH}/katenary"
|
||||
echo
|
||||
echo "Installed to $INSTALL_PATH/katenary"
|
||||
echo "Installation complete! Run 'katenary help' to get started."
|
||||
|
Reference in New Issue
Block a user