Last active
October 18, 2015 14:06
-
-
Save cr0sh/287ad9e3b3f24ef27e38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Needed to use aliases | |
shopt -s expand_aliases | |
type wget > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
if [ "$IGNORE_CERT" == "yes" ]; then | |
alias download_file="wget --no-check-certificate -q -O -" | |
else | |
alias download_file="wget -q -O -" | |
fi | |
else | |
type curl >> /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
if [ "$IGNORE_CERT" == "yes" ]; then | |
alias download_file="curl --insecure --silent --location" | |
else | |
alias download_file="curl --silent --location" | |
fi | |
else | |
echo "error, curl or wget not found" | |
fi | |
fi | |
echo "[*] Installing/updating PocketMine-MP-Bleeding(php7)" | |
mkdir -m 0777 "$INSTALL_DIRECTORY" 2> /dev/null | |
cd "$INSTALL_DIRECTORY" | |
echo "[1/3] Cleaning..." | |
rm -f "$NAME.phar" | |
rm -f README.md | |
rm -f CONTRIBUTING.md | |
rm -f LICENSE | |
rm -f start.sh | |
rm -f start.bat | |
#Old installations | |
rm -f PocketMine-MP.php | |
rm -r -f src/ | |
echo "[2/3] Skipping phar download. Please download from http://jenkins.pocketmine.net" | |
echo "[3/3] Compiling PHP" | |
download_file "https://raw.githubusercontent.com/cr0sh/php-build-scripts/patch-1/compile.sh" > /dev/null 2>&1 | |
exec "./compile.sh" | |
echo -n " regenerating php.ini..." | |
echo "" > "./bin/php7/bin/php.ini" | |
echo "opcache.enable=1" >> "./bin/php7/bin/php.ini" | |
echo "opcache.enable_cli=1" >> "./bin/php7/bin/php.ini" | |
echo "opcache.save_comments=1" >> "./bin/php7/bin/php.ini" | |
echo "opcache.fast_shutdown=1" >> "./bin/php7/bin/php.ini" | |
echo "opcache.max_accelerated_files=4096" >> "./bin/php7/bin/php.ini" | |
echo "opcache.interned_strings_buffer=8" >> "./bin/php7/bin/php.ini" | |
echo "opcache.memory_consumption=128" >> "./bin/php7/bin/php.ini" | |
echo "opcache.optimization_level=0xffffffff" >> "./bin/php7/bin/php.ini" | |
echo "date.timezone=$TIMEZONE" >> "./bin/php7/bin/php.ini" | |
echo "short_open_tag=0" >> "./bin/php7/bin/php.ini" | |
echo "asp_tags=0" >> "./bin/php7/bin/php.ini" | |
echo "phar.readonly=0" >> "./bin/php7/bin/php.ini" | |
echo "phar.require_hash=1" >> "./bin/php7/bin/php.ini" | |
echo "zend.assertions=-1" >> "./bin/php7/bin/php.ini" | |
echo " done" | |
rm -f compile.sh | |
echo "[*] Everything done! Run ./start.sh to start $NAME" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment