Added quotes to URLs

This commit is contained in:
Shoghi Cervantes 2014-01-31 21:03:28 +01:00
parent d00b489e1d
commit 09cf39b9d5
3 changed files with 22 additions and 22 deletions

View File

@ -133,7 +133,7 @@ set -e
#PHP 5
echo -n "[PHP] downloading $PHP_VERSION..."
download_file http://php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror | tar -zx >> "$DIR/install.log" 2>&1
download_file "http://php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror" | tar -zx >> "$DIR/install.log" 2>&1
mv php-$PHP_VERSION php
echo " done!"
@ -142,7 +142,7 @@ if [ 1 ] || [ "$1" == "crosscompile" ] || [ "$1" == "rpi" ]; then
else
#libedit
echo -n "[libedit] downloading $LIBEDIT_VERSION..."
download_file http://download.sourceforge.net/project/libedit/libedit/libedit-$LIBEDIT_VERSION/libedit-$LIBEDIT_VERSION.tar.gz | tar -zx >> "$DIR/install.log" 2>&1
download_file "http://download.sourceforge.net/project/libedit/libedit/libedit-$LIBEDIT_VERSION/libedit-$LIBEDIT_VERSION.tar.gz" | tar -zx >> "$DIR/install.log" 2>&1
echo -n " checking..."
cd libedit
./configure --prefix="$DIR/install_data/php/ext/libedit" --enable-static >> "$DIR/install.log" 2>&1
@ -163,7 +163,7 @@ fi
#zlib
echo -n "[zlib] downloading $ZLIB_VERSION..."
download_file http://zlib.net/zlib-$ZLIB_VERSION.tar.gz | tar -zx >> "$DIR/install.log" 2>&1
download_file "http://zlib.net/zlib-$ZLIB_VERSION.tar.gz" | tar -zx >> "$DIR/install.log" 2>&1
mv zlib-$ZLIB_VERSION zlib
echo -n " checking..."
cd zlib
@ -183,7 +183,7 @@ if [ "$(uname -s)" == "Darwin" ] && [ "$1" != "crosscompile" ] && [ "$2" != "cur
else
#curl
echo -n "[cURL] downloading $CURL_VERSION..."
download_file https://github.com/bagder/curl/archive/$CURL_VERSION.tar.gz | tar -zx >> "$DIR/install.log" 2>&1
download_file "https://github.com/bagder/curl/archive/$CURL_VERSION.tar.gz" | tar -zx >> "$DIR/install.log" 2>&1
mv curl-$CURL_VERSION curl
echo -n " checking..."
cd curl
@ -225,19 +225,19 @@ fi
#pthreads
echo -n "[PHP pthreads] downloading $PTHREADS_VERSION..."
download_file http://pecl.php.net/get/pthreads-$PTHREADS_VERSION.tgz | tar -zx >> "$DIR/install.log" 2>&1
download_file "http://pecl.php.net/get/pthreads-$PTHREADS_VERSION.tgz" | tar -zx >> "$DIR/install.log" 2>&1
mv pthreads-$PTHREADS_VERSION "$DIR/install_data/php/ext/pthreads"
echo " done!"
#PHP YAML
echo -n "[PHP YAML] downloading $PHPYAML_VERSION..."
download_file http://pecl.php.net/get/yaml-$PHPYAML_VERSION.tgz | tar -zx >> "$DIR/install.log" 2>&1
download_file "http://pecl.php.net/get/yaml-$PHPYAML_VERSION.tgz" | tar -zx >> "$DIR/install.log" 2>&1
mv yaml-$PHPYAML_VERSION "$DIR/install_data/php/ext/yaml"
echo " done!"
#YAML
echo -n "[YAML] downloading $YAML_VERSION..."
download_file http://pyyaml.org/download/libyaml/yaml-$YAML_VERSION.tar.gz | tar -zx >> "$DIR/install.log" 2>&1
download_file "http://pyyaml.org/download/libyaml/yaml-$YAML_VERSION.tar.gz" | tar -zx >> "$DIR/install.log" 2>&1
mv yaml-$YAML_VERSION yaml
echo -n " checking..."
cd yaml

View File

@ -39,7 +39,7 @@ while getopts "udv:" opt; do
done
if [ "$PMMP_VERSION" == "" ]; then
PMMP_VERSION=$(download_file https://api.github.com/repos/PocketMine/PocketMine-MP/tags | grep '"name": "[A-Za-z0-9_\.]*",' | head -1 | sed -r 's/[ ]*"name": "([A-Za-z0-9_\.]*)",[ ]*/\1/')
PMMP_VERSION=$(download_file "https://api.github.com/repos/PocketMine/PocketMine-MP/tags" | grep '"name": "[A-Za-z0-9_\.]*",' | head -1 | sed -r 's/[ ]*"name": "([A-Za-z0-9_\.]*)",[ ]*/\1/')
if [ "$PMMP_VERSION" == "" ]; then
echo "[ERROR] Couldn't get the latest PocketMine-MP version"
exit 1
@ -58,7 +58,7 @@ rm -f start.sh
rm -f start.bat
echo "[1/3] Downloading PocketMine-MP $PMMP_VERSION..."
set -e
download_file https://github.com/shoghicp/PocketMine-MP/archive/$PMMP_VERSION.tar.gz | tar -zx > /dev/null
download_file "https://github.com/shoghicp/PocketMine-MP/archive/$PMMP_VERSION.tar.gz" | tar -zx > /dev/null
mv -f PocketMine-MP-$PMMP_VERSION/* ./
rm -f -r PocketMine-MP-$PMMP_VERSION/
rm -f ./start.cmd
@ -67,13 +67,12 @@ chmod +x ./src/build/compile.sh
if [ $update == on ]; then
echo "[3/3] Skipping PHP recompilation due to user request"
else
echo -n "[3/3] Obtaining PHP: "
echo -n " detecting if build is available..."
if [ "$(uname -s)" == "Darwin" ]; then
echo -n " Mac OSX build available, downloading $MAC_BUILD.zip..."
download_file http://sourceforge.net/projects/pocketmine/files/builds/$MAC_BUILD.zip > $MAC_BUILD.zip
unzip -d ./ $MAC_BUILD.zip > /dev/null 2>&1
rm $MAC_BUILD.zip
echo -n "[3/3] Obtaining PHP:"
echo " detecting if build is available..."
if [ "$(uname -s)" == "Darwin" ]; then
rm -r -f bin/ >> /dev/null 2>&1
echo "[3/3] Mac OSX PHP build available, downloading $MAC_BUILD.tar.gz..."
download_file "http://sourceforge.net/projects/pocketmine/files/builds/$MAC_BUILD.tar.gz" | tar -zx > /dev/null 2>&1
chmod +x ./bin/php5/bin/*
echo " done"
else
@ -81,16 +80,17 @@ else
grep -q BCM2708 /proc/cpuinfo > /dev/null 2>&1
if [ $? -eq 0 ]; then
set -e
echo -n " Raspberry Pi build available, downloading $RPI_BUILD.tar.gz..."
download_file http://sourceforge.net/projects/pocketmine/files/builds/$RPI_BUILD.tar.gz | tar -zx > /dev/null 2>&1
rm -r -f bin/ >> /dev/null 2>&1
echo "[3/3] Raspberry Pi build available, downloading $RPI_BUILD.tar.gz..."
download_file "http://sourceforge.net/projects/pocketmine/files/builds/$RPI_BUILD.tar.gz" | tar -zx > /dev/null 2>&1
chmod +x ./bin/php5/bin/*
echo " done"
else
set -e
echo " no build found, compiling PHP"
echo "[3/3] no build found, compiling PHP"
exec ./src/build/compile.sh
fi
fi
fi
echo "[INFO] Done"
echo "[INFO] Everything done! Run ./start.sh to start PocketMine-MP"
exit 0

View File

@ -2,7 +2,7 @@
export PATH=/opt/arm-2013.05/bin:/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
export THREADS=2
rm -rf $WORKSPACE/compile.sh
curl --insecure --location https://github.com/PocketMine/PocketMine-MP/raw/master/src/build/compile.sh > $WORKSPACE/compile.sh
curl --insecure --location "https://github.com/PocketMine/PocketMine-MP/raw/master/src/build/compile.sh" > $WORKSPACE/compile.sh
chmod +x $WORKSPACE/compile.sh
SCRIPT="$WORKSPACE/compile.sh"
ARCHIVE=$WORKSPACE/archive
@ -86,7 +86,7 @@ then
mkdir -p {$COMPILEDIR,$ARCHIVE}/crosscompile/mac
cd $COMPILEDIR/crosscompile/mac
$SCRIPT crosscompile mac
$SCRIPT crosscompile mac curl
cp -r $COMPILEDIR/crosscompile/mac/{install.log,bin/*} $ARCHIVE/crosscompile/mac/
fi