Skip to content

Commit 5880a59

Browse files
committed
fix: install script
1 parent 8eb11ae commit 5880a59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function prompt_yes_no {
6363
}
6464

6565
confirmed=$(prompt_yes_no "Do you want to continue with the installation?")
66-
if [ "$confirmed" -eq 1 ]; then
66+
if [ $confirmed == 1 ]; then
6767
echo -e "${RED}Installation aborted.${NC}"
6868
exit 1
6969
fi
@@ -101,10 +101,10 @@ if [[ "$PKG_TYPE" == "deb" || "$PKG_TYPE" == "rpm" ]]; then
101101

102102
if [[ "$PKG_TYPE" == "deb" ]]; then
103103
sudo dpkg -i "$TEMP_DIR/grhooks.deb" || sudo apt-get install -f -y
104-
INSTALL_DIR=$(which grhooks || echo "/usr/bin/grhooks")
104+
INSTALL_DIR=$(dirname $(which grhooks) || echo "/usr/bin/grhooks")
105105
else
106106
sudo rpm -ivh "$TEMP_DIR/grhooks.rpm" || sudo yum install -y
107-
INSTALL_DIR=$(which grhooks || echo "/usr/bin/grhooks")
107+
INSTALL_DIR=$(dirname $(which grhooks) || echo "/usr/bin/grhooks")
108108
fi
109109
else
110110
sudo tar -xJf "$TEMP_DIR/grhooks.tar.xz" -C "$TEMP_DIR"

0 commit comments

Comments
 (0)