From 293b31cb0081a9bf61dcb0edf6e09ba965c42a1a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 9 Jun 2020 20:44:15 +0200 Subject: Added ID_LIKE support, fail if no PKGMAN --- libs/pkgmanager | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs') diff --git a/libs/pkgmanager b/libs/pkgmanager index 7a5793a..5f5ecc3 100644 --- a/libs/pkgmanager +++ b/libs/pkgmanager @@ -5,6 +5,8 @@ alias sudo="sudo " PKGMAN="/bin/false" [ -f "/etc/os-release" ] && source /etc/os-release +[ -z $ID ] && ID=$ID_LIKE + case $ID in arch) PKGMAN="pacman" @@ -22,6 +24,9 @@ case $ID in UPGRADE_CMD="upgrade -y" FULLUPGRADE_CMD="dist-upgrade" ;; + *) + 1>&2 echo Distribution could not be determined + exit 1 esac alias pkg_install="$PKGMAN $INSTALL_CMD" -- cgit v1.2.3