misc: Add pacman support
This commit is contained in:
@@ -15,13 +15,14 @@ YUM=`which yum 2>/dev/null`
|
|||||||
DNF=`which dnf 2>/dev/null`
|
DNF=`which dnf 2>/dev/null`
|
||||||
APT=`which apt-get 2>/dev/null`
|
APT=`which apt-get 2>/dev/null`
|
||||||
BREW=`which brew 2>/dev/null`
|
BREW=`which brew 2>/dev/null`
|
||||||
|
PACMAN=`which pacman 2>/dev/null`
|
||||||
|
|
||||||
# if DNF is available use it
|
# if DNF is available use it
|
||||||
if [ -x "$DNF" ]; then
|
if [ -x "$DNF" ]; then
|
||||||
YUM=$DNF
|
YUM=$DNF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$YUM" -a -z "$APT" -a -z "$BREW" ]; then
|
if [ -z "$YUM" -a -z "$APT" -a -z "$BREW" -a -z "$PACMAN" ]; then
|
||||||
echo "The package managers can't be found."
|
echo "The package managers can't be found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -41,6 +42,10 @@ if [ ! -z "$BREW" ]; then
|
|||||||
$BREW install libvirt || true
|
$BREW install libvirt || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$PACMAN" ]; then
|
||||||
|
$sudo_command $PACMAN -S --noconfirm libvirt augeas libpcap
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $travis -eq 0 ]; then
|
if [ $travis -eq 0 ]; then
|
||||||
if [ ! -z "$YUM" ]; then
|
if [ ! -z "$YUM" ]; then
|
||||||
# some go dependencies are stored in mercurial
|
# some go dependencies are stored in mercurial
|
||||||
@@ -54,6 +59,9 @@ if [ $travis -eq 0 ]; then
|
|||||||
$sudo_command $APT install -y golang-golang-x-tools || true
|
$sudo_command $APT install -y golang-golang-x-tools || true
|
||||||
$sudo_command $APT install -y golang-go.tools || true
|
$sudo_command $APT install -y golang-go.tools || true
|
||||||
fi
|
fi
|
||||||
|
if [ ! -z "$PACMAN" ]; then
|
||||||
|
$sudo_command $PACMAN -S --noconfirm go
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if golang is too old, we don't want to fail with an obscure error later
|
# if golang is too old, we don't want to fail with an obscure error later
|
||||||
|
|||||||
Reference in New Issue
Block a user