From 99b09e5903dabec8c3d70116c889c81b1ddaa7dc Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" Date: Thu, 29 Jun 2023 23:18:36 +0300 Subject: [PATCH] add driver modifier --- data/modify-driver.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 data/modify-driver.sh diff --git a/data/modify-driver.sh b/data/modify-driver.sh new file mode 100755 index 0000000..b9d08b8 --- /dev/null +++ b/data/modify-driver.sh @@ -0,0 +1,8 @@ +#! /bin/bash + +if dpkg -s "$1" +then + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt remove $1 -y && sudo apt autoremove -y" +else + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt install $1 -y" +fi