mirror of
https://github.com/ellie/atuin.git
synced 2024-08-17 17:00:33 +03:00
fix(installer): use case-insensitive comparison (#776)
This commit is contained in:
parent
0dc918e8e5
commit
0f598032b6
10
install.sh
10
install.sh
@ -82,16 +82,16 @@ __atuin_install_linux(){
|
||||
echo "Detected Linux!"
|
||||
echo "Checking distro..."
|
||||
if (uname -a | grep -qi "Microsoft"); then
|
||||
OS="UbuntuWSL"
|
||||
OS="ubuntuwsl"
|
||||
elif ! command -v lsb_release &> /dev/null; then
|
||||
echo "lsb_release could not be found. Falling back to /etc/os-release"
|
||||
OS="$(grep -Po '(?<=^ID=).*$' /etc/os-release)" 2>/dev/null
|
||||
OS="$(grep -Po '(?<=^ID=).*$' /etc/os-release | tr '[:upper:]' '[:lower:]')" 2>/dev/null
|
||||
else
|
||||
OS=$(lsb_release -i | awk '{ print $3 }')
|
||||
OS=$(lsb_release -i | awk '{ print $3 }' | tr '[:upper:]' '[:lower:]')
|
||||
fi
|
||||
if [ "$OS" == "Arch" ] || [ "$OS" == "ManjaroLinux" ]; then
|
||||
if [ "$OS" == "arch" ] || [ "$OS" == "manjarolinux" ]; then
|
||||
__atuin_install_arch
|
||||
elif [ "$OS" == "Ubuntu" ] || [ "$OS" == "UbuntuWSL" ] || [ "$OS" == "Debian" ] || [ "$OS" == "Linuxmint" ] || [ "$OS" == "Parrot" ] || [ "$OS" == "Kali" ] || [ "$OS" == "Elementary" ] || [ "$OS" == "Pop" ]; then
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user