zshrc: feat: Add distro type determination
This commit is contained in:
11
.zshrc
11
.zshrc
@@ -31,6 +31,17 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
DISTRO=$(uname -s)
|
||||
VER=$(uname -r)
|
||||
fi
|
||||
|
||||
if command -v dpkg &> /dev/null; then
|
||||
# Debian-based
|
||||
DISTRO_TYPE=debian
|
||||
elif command -v yum &> /dev/null; then
|
||||
# RPM-based
|
||||
DISTRO_TYPE=rpm
|
||||
elif command -v pacman &> /dev/null; then
|
||||
# Arch-based
|
||||
DISTRO_TYPE=arc
|
||||
fi
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# macOS
|
||||
OSNAME=macOS
|
||||
|
||||
Reference in New Issue
Block a user