mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-26 02:04:49 +01: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 "Detected Linux!"
|
||||||
echo "Checking distro..."
|
echo "Checking distro..."
|
||||||
if (uname -a | grep -qi "Microsoft"); then
|
if (uname -a | grep -qi "Microsoft"); then
|
||||||
OS="UbuntuWSL"
|
OS="ubuntuwsl"
|
||||||
elif ! command -v lsb_release &> /dev/null; then
|
elif ! command -v lsb_release &> /dev/null; then
|
||||||
echo "lsb_release could not be found. Falling back to /etc/os-release"
|
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
|
else
|
||||||
OS=$(lsb_release -i | awk '{ print $3 }')
|
OS=$(lsb_release -i | awk '{ print $3 }' | tr '[:upper:]' '[:lower:]')
|
||||||
fi
|
fi
|
||||||
if [ "$OS" == "Arch" ] || [ "$OS" == "ManjaroLinux" ]; then
|
if [ "$OS" == "arch" ] || [ "$OS" == "manjarolinux" ]; then
|
||||||
__atuin_install_arch
|
__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
|
__atuin_install_ubuntu
|
||||||
else
|
else
|
||||||
# TODO: download a binary or smth
|
# TODO: download a binary or smth
|
||||||
|
Loading…
Reference in New Issue
Block a user