@@ -37,13 +37,12 @@ set -o pipefail # Return exit status of the last command in the pipe that failed
3737# GLOBALS
3838# ==============================================================================
3939readonly EX_OK=0 # Successful termination
40- readonly EX_ROOT=3 # Running as root
41- readonly EX_PHP_NOT_FOUND=4 # PHP was not found
42- readonly EX_GIT_NOT_FOUND=5 # GIT not found
43- readonly EX_CURL_NOT_FOUND=6 # curl not found
44- readonly EX_NET_ERR=7 # Something went wrong during a file download
45- readonly EX_SIG_MISMATCH=8 # Composer installer signature mismatch
46- readonly EX_SETUP_ERR=9 # Composer setup failure
40+ readonly EX_PHP_NOT_FOUND=3 # PHP was not found
41+ readonly EX_GIT_NOT_FOUND=4 # GIT not found
42+ readonly EX_CURL_NOT_FOUND=5 # curl not found
43+ readonly EX_NET_ERR=6 # Something went wrong during a file download
44+ readonly EX_SIG_MISMATCH=7 # Composer installer signature mismatch
45+ readonly EX_SETUP_ERR=8 # Composer setup failure
4746
4847# Temporary directory for storing the Composer setup script
4948readonly COMPOSER_TMPDIR=$( mktemp -d " /tmp/composer.XXXXXXXXXXXX" )
@@ -119,17 +118,13 @@ display_error_message() {
119118# EX_CURL_NOT_FOUND
120119# EX_GIT_NOT_FOUND
121120# EX_PHP_NOT_FOUND
122- # EX_ROOT
123121# UID
124122# Arguments:
125123# None
126124# Returns:
127125# None
128126# ------------------------------------------------------------------------------
129127check_runtime_requirements () {
130- if [[ " $UID " -eq 0 ]]; then
131- display_error_message ' This script must NOT be run as root' $EX_ROOT
132- fi
133128 type php > /dev/null 2>&1 || display_error_message \
134129 ' PHP is not found, installation aborted!' $EX_PHP_NOT_FOUND
135130 type git > /dev/null 2>&1 || display_error_message \
0 commit comments