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`
|
OS_ARCH=`uname -m`
|
||||||
|
|
||||||
# Distro detection.
|
# Distro detection.
|
||||||
LSBRELEASE=$(which lsb_release)
|
if [[ -f /etc/os-release ]]; then
|
||||||
if [ $? -eq 0 ]; then
|
. /etc/os-release
|
||||||
DISTRO=`lsb_release -i -s`
|
DISTRO=${ID}
|
||||||
else
|
else
|
||||||
# BSDs OS and macOS can be detected via uname.
|
# BSDs OS and macOS can be detected via uname.
|
||||||
DISTRO=${OS}
|
DISTRO=${OS}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
AUTOSUGGESTIONS_PATH="/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
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}" = "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}" = "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}" == "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}" = "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
|
if [ -f "${AUTOSUGGESTIONS_PATH}" ]; then
|
||||||
source "${AUTOSUGGESTIONS_PATH}"
|
source "${AUTOSUGGESTIONS_PATH}"
|
||||||
|
|||||||
Reference in New Issue
Block a user