diff options
author | mentalisttraceur <mentalisttraceur@gmail.com> | 2023-09-11 08:16:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-11 09:16:08 +0100 |
commit | 2342a3392349c0ae9d742e9da9833590e6567d08 (patch) | |
tree | b94b057fd67b999eb4b1f3408d7c7d0b98f28289 /install.sh | |
parent | b7481993e39829799d986f74ad4c85f377c6fd69 (diff) |
Use `case` for Linux distro choice in `install.sh` (#1200)
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/install.sh b/install.sh index 6d3da5b53..07c16942a 100755 --- a/install.sh +++ b/install.sh @@ -92,14 +92,15 @@ __atuin_install_linux(){ else OS=$(lsb_release -i | awk '{ print $3 }' | tr '[:upper:]' '[:lower:]') fi - if [ "$OS" == "arch" ] || [ "$OS" == "manjarolinux" ] || [ "$OS" == "endeavouros" ]; then - __atuin_install_arch - elif [ "$OS" == "ubuntu" ] || [ "$OS" == "ubuntuwsl" ] || [ "$OS" == "debian" ] || [ "$OS" == "linuxmint" ] || [ "$OS" == "parrot" ] || [ "$OS" == "kali" ] || [ "$OS" == "elementary" ] || [ "$OS" == "pop" ]; then - __atuin_install_ubuntu - else - # TODO: download a binary or smth - __atuin_install_unsupported - fi + case "$OS" in + "arch" | "manjarolinux" | "endeavouros") + __atuin_install_arch;; + "ubuntu" | "ubuntuwsl" | "debian" | "linuxmint" | "parrot" | "kali" | "elementary" | "pop") + __atuin_install_ubuntu;; + *) + # TODO: download a binary or smth + __atuin_install_unsupported;; + esac } __atuin_install_mac(){ |