Skip to content

Commit

Permalink
Fixed removing drivers root folder in case conf is confirmed to remov…
Browse files Browse the repository at this point in the history
…e & numpad layouts too
  • Loading branch information
ldrahnik committed Mar 18, 2023
1 parent 4f71aec commit 27507e8
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ if [ "$CONFIG_FILE_DIFF" != "" ]
then
read -r -p "Config file contains modifications compared to the default one. Do you want remove config file [y/N]" response
case "$response" in [yY][eE][sS]|[yY])
rm -f /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev

if test -d "$NUMPAD_LAYOUTS_DIR"
then
rm -f /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev
else
rm -rf /usr/share/asus_touchpad_numpad-driver
fi

if [[ $? != 0 ]]
then
echo "/usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev cannot be removed correctly..."
Expand All @@ -109,7 +116,14 @@ then
;;
esac
else
rm -f /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev

if test -d "$NUMPAD_LAYOUTS_DIR"
then
rm -f /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev
else
rm -rf /usr/share/asus_touchpad_numpad-driver
fi

if [[ $? != 0 ]]
then
echo "/usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev cannot be removed correctly..."
Expand Down

0 comments on commit 27507e8

Please sign in to comment.