package-manager-detection
Package manager detection
Snippet for package manager detection
if [ $(rpm -qa 2>/dev/null | wc -l ) -gt 10 ]; then system="rpm" elif [ $(dpkg -l 2>/dev/null | wc -l ) -gt 10 ]; then system="dpkg" else system="unk" fi echo $system
package-manager-detection.txt · Last modified: 2020/04/21 16:41 by dreiggy