Add pacman and Arch reporting

This commit is contained in:
Bruno Tavares 2014-03-20 18:21:45 -03:00
parent 0f0ba26f8e
commit 884a7fd143
4 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,7 @@
kickstart.os() {
[ -f /etc/lsb-release ] && echo "Ubuntu"
[ -f /etc/redhat-release ] && echo "RHEL"
[ -f /etc/arch-release ] && echo "Arch"
uname -a | kickstart.stream.contains Darwin && echo "Mac"
}

View File

@ -2,7 +2,8 @@ kickstart.package.manager() {
kickstart.command_exists apt-get && echo "apt-get" && return 0
kickstart.command_exists brew && echo "brew" && return 0
kickstart.command_exists yum && echo "yum" && return 0
kickstart.info "kickstart supports apt-get, yum or brew" && exit 1
kickstart.command_exists pacman && echo "pacman" && return 0
kickstart.info "kickstart supports apt-get, yum, pacman or brew" && exit 1
}
for recipe in recipes/kickstart/package/*.sh; do

View File

@ -18,3 +18,7 @@ kickstart.package.install.brew() {
kickstart.package.install.yum() {
kickstart.mute yum install -y "$@"
}
kickstart.package.install.pacman() {
kickstart.mute pacman -S --noconfirm "$@"
}

View File

@ -10,6 +10,10 @@ kickstart.package.installed.brew() {
! $(brew info "$@" | kickstart.stream.contains "Not installed")
}
kickstart.package.installed.pacman() {
kickstart.mute pacman -Q "$@"
}
kickstart.package.installed.yum() {
local yum_packages="`yum list installed`"
for package in "$@"; do