Get rid of lsb-release dependency
This commit is contained in:
+3
-3
@@ -6,9 +6,9 @@ OS_RELEASE=`uname -r`
|
||||
OS_ARCH=`uname -m`
|
||||
|
||||
# Distro detection.
|
||||
LSBRELEASE=$(which lsb_release)
|
||||
if [ $? -eq 0 ]; then
|
||||
DISTRO=`lsb_release -i -s`
|
||||
if [[ -f /etc/os-release ]]; then
|
||||
. /etc/os-release
|
||||
DISTRO=${ID}
|
||||
else
|
||||
# BSDs OS and macOS can be detected via uname.
|
||||
DISTRO=${OS}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
AUTOSUGGESTIONS_PATH="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
|
||||
if [ "${DISTRO}" = "Arch" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
|
||||
if [ "${DISTRO}" = "EnveavourOS" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
|
||||
if [ "${DISTRO}" = "arch" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
|
||||
if [ "${DISTRO}" = "endeavouros" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
|
||||
if [[ "${DISTRO}" = "Darwin" && "${OS_ARCH}" == "arm64" ]]; then AUTOSUGGESTIONS_PATH="/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
|
||||
if [[ "${DISTRO}" = "Darwin" && "${OS_ARCH}" == "x86_64" ]]; then AUTOSUGGESTIONS_PATH="/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; fi
|
||||
if [ "${DISTRO}" = "VoidLinux" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions.zsh"; fi
|
||||
if [ "${DISTRO}" = "voidlinux" ]; then AUTOSUGGESTIONS_PATH="/usr/share/zsh/plugins/zsh-autosuggestions.zsh"; fi
|
||||
|
||||
if [ -f "${AUTOSUGGESTIONS_PATH}" ]; then
|
||||
source "${AUTOSUGGESTIONS_PATH}"
|
||||
|
||||
Reference in New Issue
Block a user