mirror of
https://github.com/joglomedia/LEMPer.git
synced 2026-04-05 12:18:19 +00:00
49 lines
1.4 KiB
Bash
Executable File
49 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Phalcon PHP extension installer
|
|
# Min. Requirement : GNU/Linux Ubuntu 14.04
|
|
# Last Build : 13/11/2015
|
|
# Author : MasEDI.Net (hi@masedi.net)
|
|
|
|
# Make sure only root can run this installer script
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
echo "You need to be root to run this script"
|
|
exit 1
|
|
fi
|
|
|
|
cat <<- _EOF_
|
|
#========================================================================#
|
|
# PhalconPHP Installer for Ubuntu Server, Written by ESLabs.ID #
|
|
#========================================================================#
|
|
# A small tool to install PhalconPHP Framework & Zephir Interpreter #
|
|
# #
|
|
# For more information please visit https://eslabs.id/lemper #
|
|
#========================================================================#
|
|
_EOF_
|
|
|
|
# Prerequisite packages
|
|
apt-get install re2c libpcre3-dev gcc make
|
|
|
|
# Install Zephir
|
|
while [[ $INSTALL_ZEPHIR != "y" && $INSTALL_ZEPHIR != "n" ]]; do
|
|
read -p "Install Zephir Interpreter? [y/n]: " -e INSTALL_ZEPHIR
|
|
done
|
|
|
|
if [[ "$INSTALL_ZEPHIR" == Y* || "$INSTALL_ZEPHIR" == y* ]]; then
|
|
# clon Zephir repo
|
|
git clone -q https://github.com/phalcon/zephir.git
|
|
cd zephir
|
|
|
|
# install json-c
|
|
./install-json
|
|
|
|
# install zephir
|
|
composer install
|
|
./install
|
|
fi
|
|
|
|
git clone -q http://github.com/phalcon/cphalcon.git
|
|
git checkout master
|
|
cd cphalcon/build
|
|
./install
|