summaryrefslogtreecommitdiff
path: root/travis_install.sh
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2015-08-04 19:24:11 +0100
committerrubenwardy <rubenwardy@gmail.com>2015-08-04 20:16:50 +0100
commit9913055d6a9cdb6a1b56f65e725dc8af96d66afc (patch)
tree17bbef13ece82a5c38e5fc629fe92f75aa3e8d3f /travis_install.sh
parent3edc66302e9b6d76d5eb1e3963ed9b8ea19b8640 (diff)
Add travis checks
Diffstat (limited to 'travis_install.sh')
-rwxr-xr-xtravis_install.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/travis_install.sh b/travis_install.sh
new file mode 100755
index 0000000..856e625
--- /dev/null
+++ b/travis_install.sh
@@ -0,0 +1,56 @@
+# Move the food modpack to a subfolder
+mkdir tmp1 && mv * tmp1
+mv tmp1 food
+
+# Install dependancies
+sudo apt-get update
+sudo apt-get install -y libirrlicht-dev libbz2-dev \
+ libpng12-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \
+ libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev \
+ libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev wget \
+ lua5.1 luarocks libzzip-dev luajit
+sudo luarocks install luazip
+sudo luarocks install luafilesystem
+sudo luarocks install luajson
+
+# Get minetest
+wget https://www.dropbox.com/s/wtub256856vdclf/minetestserver.zip?dl=1 -O minetestserver.zip
+unzip minetestserver.zip -d minetest
+
+# Install the food modpack
+cp food minetest/mods -rf
+
+# Install and configure mtpm
+git clone https://github.com/rubenwardy/mtpm
+cd mtpm
+mkdir tmp
+./mtpm.lua config mod_location ../minetest/mods/
+
+# Install the food modpack's supported mods
+./mtpm.lua install -r ../food/requirements.txt -y
+
+# Configure Minetest
+echo "Configuring Minetest"
+cd ../minetest
+mkdir worlds/world
+echo "gameid = minetest" > worlds/world/world.mt
+echo "backend = sqlite3" >> worlds/world/world.mt
+echo "creative_mode = true" >> worlds/world/world.mt
+echo "enable_damage = true" >> worlds/world/world.mt
+cd mods
+for f in *
+ do
+ echo "load_mod_$f = true" >> ../worlds/world/world.mt
+done
+
+# Install test worldmod
+cd ../
+mkdir worlds/world/worldmods/
+mkdir worlds/world/worldmods/food_test/
+echo "minetest.after(0, function()" > worlds/world/worldmods/food_test/init.lua
+echo " print(\"tests complete\")" >> worlds/world/worldmods/food_test/init.lua
+echo " minetest.request_shutdown()" >> worlds/world/worldmods/food_test/init.lua
+echo "end)" >> worlds/world/worldmods/food_test/init.lua
+
+# Go pack to the right directory
+cd ../food