Skip to content

Commit

Permalink
Added method to dectect specificly Arch Linux over just pacman presence
Browse files Browse the repository at this point in the history
  • Loading branch information
Magissia committed Jun 22, 2016
1 parent a42e4fc commit 48623fa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions php5-fpm-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@ pkgbase="php"
pkgver="5.6.22"

function CheckPackageManager {
CheckArchLinux()
if [ $? = 0]; then
PacManInstall()
return ArchLinux
fi
CheckPacman()
if [ $? = 0 ]; then
PacManInstall()
return PacMan
fi
}

function CheckArchLinux {
cat /etc/issue | grep "Arch Linux" || return 1
return 0
}

function CheckPacman {
command -v pacman >/dev/null 2>&1 || return 1
return 0
Expand All @@ -28,6 +40,7 @@ function CheckYum {
}

function PacManInstall {
echo "Let's trust gpg keys from the PHP project"
gpg --keyserver pgp.mit.edu --recv-keys C2BF0BC433CFC8B3
gpg --keyserver pgp.mit.edu --recv-keys FE857D9A90D90EC1
[ -e $SCRIPTDIRECTORY/PKGBUILD ] || { exit 11; echo "PKGBUILD missing !"}
Expand Down

0 comments on commit 48623fa

Please sign in to comment.