Return the result of the kickstart.package.install or just skip when already installed

This commit is contained in:
Bruno Tavares 2014-02-22 16:48:45 -03:00
parent d4ad417027
commit 1b7edd0b1c

View File

@ -13,11 +13,9 @@ kickstart.package.installed() {
kickstart.package.install() {
if kickstart.package.installed "$@"; then
kickstart.info "$@ already installed"
return 1
else
kickstart.info "No packages found matching $@. Installing..."
kickstart.mute "`kickstart.package.manager` install -y $@"
return 0
fi
}