Remove yum support. I didn't test on it yet
This commit is contained in:
parent
0535568078
commit
e6ba63f470
@ -1,14 +1,12 @@
|
||||
kickstart.package.manager() {
|
||||
kickstart.command_exists apt-get && echo "apt-get" && return 0
|
||||
kickstart.command_exists yum && echo "yum" && return 0
|
||||
kickstart.command_exists brew && echo "brew" && return 0
|
||||
kickstart.info "kickstart supports apt-get, yum or brew" && exit 1
|
||||
kickstart.info "kickstart supports apt-get or brew" && exit 1
|
||||
}
|
||||
|
||||
kickstart.package.installed() {
|
||||
local pkg_manager=`kickstart.package.manager`
|
||||
[ $pkg_manager = 'apt-get' ] && dpkg -s $@ >/dev/null 2>&1 && return $?
|
||||
[ $pkg_manager = 'yum' ] && rpm -qa | grep -q $@ && return $?
|
||||
[ $pkg_manager = 'brew' ] && ! $(brew info $@ | grep -q "Not installed") && return $?
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user