#!/bin/sh set -e set -o noglob # Usage: # curl -sfL https://get.maid.sh | sh - # curl ... | ENV_VAR=... sh - LC_ALL=C.UTF-8 # --- use sudo if we are not already root --- SUDO=sudo if [ $(id -u) -eq 0 ]; then SUDO= fi install_php() { $SUDO add-apt-repository ppa:ondrej/php $SUDO apt -y update $SUDO apt -y install php-cli php-zip unzip } install_composer() { curl -sS https://getcomposer.org/installer -o composer-setup.php $SUDO php composer-setup.php --install-dir=/usr/local/bin --filename=composer rm composer-setup.php } install_maid() { composer global require ghostzero/maid:dev-master } { install_php install_composer install_maid }