diff options
author | SuperPenguin34 <108895116+CoolPenguin27@users.noreply.github.com> | 2023-09-03 22:56:10 -0700 |
---|---|---|
committer | SuperPenguin34 <108895116+CoolPenguin27@users.noreply.github.com> | 2023-09-03 22:56:10 -0700 |
commit | 31b2a6cdf9342078ffbc97fcf65cb44af3b735e3 (patch) | |
tree | 3313e3904e26e56315a8c36a2bd760b5dbce7e46 /install.sh | |
parent | 2291f57e91dfb63362fea8903d6e411937e39e7c (diff) |
add check if keyd is already installed
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/install.sh b/install.sh index 21a65c9..f5aff2d 100755 --- a/install.sh +++ b/install.sh @@ -15,40 +15,44 @@ elif [ -f /usr/bin/apk ]; then distro="alpine" fi -echo "Installing keyd dependencies" -case $distro in - deb) - sudo apt install -y build-essential git - ;; - arch) - sudo pacman -S --noconfirm base-devel git - ;; - fedora) - sudo dnf groupinstall -y "Development Tools" "Development Libraries" - ;; -esac -echo "Installing keyd" -case $distro in - suse) - sudo zypper --non-interactive install keyd - ;; - arch) - git clone https://aur.archlinux.org/keyd.git - cd keyd - makepkg -si --noconfirm - ;; - alpine) - doas apk add --no-interactive keyd - ;; - *) - git clone https://github.com/rvaiya/keyd - cd keyd - make - sudo make install - cd .. - ;; -esac +if ! [ -f /usr/bin/keyd ]; then + # if keyd isnt installed + echo "Installing keyd dependencies" + case $distro in + deb) + sudo apt install -y build-essential git + ;; + arch) + sudo pacman -S --noconfirm base-devel git + ;; + fedora) + sudo dnf groupinstall -y "Development Tools" "Development Libraries" + ;; + esac + + echo "Installing keyd" + case $distro in + suse) + sudo zypper --non-interactive install keyd + ;; + arch) + git clone https://aur.archlinux.org/keyd.git + cd keyd + makepkg -si --noconfirm + ;; + alpine) + doas apk add --no-interactive keyd + ;; + *) + git clone https://github.com/rvaiya/keyd + cd keyd + make + sudo make install + cd .. + ;; + esac +fi echo "Generating config" python3 cros-keyboard-map.py |