From a30f78c1c8524293ebf3e2994b010a97fa2416bf Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sun, 9 Oct 2016 21:31:36 -0700 Subject: [PATCH] Oneliner php version check, passes `set -e` check. --- automated install/basic-install.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index cbd1c9b0..341588cb 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -65,11 +65,8 @@ fi if [ -x "$(command -v apt-get)" ];then #Debian Family #Decide if php should be `php5` or just `php` (Fixes issues with Ubuntu 16.04 LTS) - phpVer="php" - apt-get install --dry-run php5 > /dev/null 2>&1 - if [ $? == 0 ]; then - phpVer="php5" - fi + phpVer="php5" + apt-get install --dry-run php5 > /dev/null 2>&1 || phpVer="php" ############################################# PKG_MANAGER="apt-get" PKG_CACHE="/var/lib/apt/lists/"