dotfiles/symlinks/bin/get-package-manager-name

18 lines
246 B
Plaintext
Raw Permalink Normal View History

2021-01-07 08:09:41 +00:00
#!/bin/sh
PACKAGE_MANAGER="Unknown"
if type apt > /dev/null 2>&1
then
PACKAGE_MANAGER="apt"
fi
if type pacman > /dev/null 2>&1
then
PACKAGE_MANAGER="pacman"
fi
if type dnf > /dev/null 2>&1
then
PACKAGE_MANAGER="dnf"
fi
2021-01-07 08:09:41 +00:00
echo $PACKAGE_MANAGER