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

18 lines
246 B
Bash
Executable File

#!/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
echo $PACKAGE_MANAGER