Advertisement
wai0004

mc:pe server installation.sh

Sep 17th, 2013
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.00 KB | None | 0 0
  1. #!/bin/bash
  2. PMMP_VERSION="Alpha_1.3.9"
  3. update=off
  4.  
  5. while getopts "ud" opt; do
  6.   case $opt in
  7.     u)
  8.       update=on
  9.       ;;
  10.     d)
  11.       PMMP_VERSION="master"
  12.       ;;
  13.     \?)
  14.       echo "Invalid option: -$OPTARG" >&2
  15.       exit 1
  16.       ;;
  17.   esac
  18. done
  19.  
  20. echo "[INFO] PocketMine-MP $PMMP_VERSION downloader & installer for Linux & Mac"
  21. echo "[0/2] Cleaning..."
  22. rm -r -f src/
  23. rm -f PocketMine-MP.php
  24. rm -f README.md
  25. rm -f CONTRIBUTING.md
  26. rm -f LICENSE
  27. rm -f start.sh
  28. rm -f start.bat
  29. echo "[1/2] Downloading PocketMine-MP $PMMP_VERSION..."
  30. set -e
  31. wget https://github.com/shoghicp/PocketMine-MP/archive/$PMMP_VERSION.tar.gz --no-check-certificate -q -O - | tar -zx > /dev/null
  32. mv -f PocketMine-MP-$PMMP_VERSION/* ./
  33. rm -f -r PocketMine-MP-$PMMP_VERSION/
  34. rm -f ./start.cmd
  35. chmod 0755 ./start.sh
  36. chmod 0755 ./src/build/compile.sh
  37. if [ $update == on ]; then
  38.     echo "[2/2] Skipping PHP recompilation due to user request"
  39. else
  40.     echo "[2/2] Compiling PHP"
  41.     ./src/build/compile.sh
  42. fi
  43. echo "[INFO] Done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement