Update install.sh

This commit is contained in:
ivanovborislav 2022-12-26 18:08:51 +02:00 committed by GitHub
parent f7e41d7c25
commit f8604c4cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 83 deletions

View File

@ -132,87 +132,4 @@ elif [ "$1" = "-u" ];then
else else
echo "Incorrect [options] "$1"" echo "Incorrect [options] "$1""
help help
fi
fi
else
if [ "$EUID" != "0" ];then
echo "You need root permissions:"
sudo cp -r "$(pwd)" /usr/src/rtl8188eu-5.13.3
else
cp -r "$(pwd)" /usr/src/rtl8188eu-5.13.3
fi
fi
if [ -f "/lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko" ];then
if [ "$EUID" != "0" ];then
echo "You need root permissions:"
sudo rm -f /lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko
else
rm -f /lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko
fi
fi
if [ "$EUID" != "0" ];then
echo "You need root permissions:"
sudo dkms add -m rtl8188eu -v 5.13.3; Error=$?
sudo dkms build -m rtl8188eu -v 5.13.3; Error=$?
else
dkms add -m rtl8188eu -v 5.13.3; Error=$?
dkms build -m rtl8188eu -v 5.13.3; Error=$?
fi
if [ "$Error" != "0" ];then
echo "Install error: $Error"
exit
else
if [ "$EUID" != "0" ];then
echo "You need root permissions:"
sudo dkms install -m rtl8188eu -v 5.13.3; Error=$?
else
dkms install -m rtl8188eu -v 5.13.3; Error=$?
fi
fi
else
echo "Module rtl8188eu already installed"
fi
fi
}
uinst_drv () {
if ! command -v dkms >/dev/null 2>&1;then
if [ -f "/lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko" ];then
if [ "$EUID" != "0" ];then
echo "You need root permissions:"
sudo make uninstall; Error=$?
else
make uninstall; Error=$?
fi
else
echo "Module rtl8188eu already uninstalled"
fi
else
if [[ "`dkms status`" =~ "rtl8188eu" ]];then
if [ "$EUID" != "0" ];then
echo "You need root permissions:"
sudo dkms remove -m rtl8188eu -v 5.13.3 --all; Error=$?
else
dkms remove -m rtl8188eu -v 5.13.3 --all; Error=$?
fi
else
echo "Module rtl8188eu already uninstalled"
fi
fi
}
if [ -z "$1" ];then
echo "[options] is not defined"
help
elif [ "$1" = "-h" ] || [ "$1" = "--help" ];then
help
elif [ "$1" = "-i" ];then
echo "Install Realtek RTL8188EU Wireless Lan Driver..."
inst_drv
elif [ "$1" = "-u" ];then
echo "Uninstall Realtek RTL8188EU Wireless Lan Driver..."
uinst_drv
else
echo "Incorrect [options] "$1""
help
fi fi