Browse Source

fixing Bucket_Game script

master
poikilos 6 years ago
committed by Jacob Gustafson
parent
commit
3592172cee
  1. 1
      .gitignore
  2. 16
      webapp/reset-minetest.sh

1
.gitignore

@ -6,3 +6,4 @@
/webapp/linux-minetest-kit-poikilos-patch /webapp/linux-minetest-kit-poikilos-patch
/webapp/screenshots /webapp/screenshots
/webapp/program.log /webapp/program.log
/webapp/WIP

16
webapp/reset-minetest.sh

@ -1,13 +1,15 @@
#!/bin/bash -e #!/bin/bash
zip_name=linux-minetest-kit.zip zip_name=linux-minetest-kit.zip
extracted_name=linux-minetest-kit extracted_name=linux-minetest-kit
in_use_name=minetest in_use_name=minetest
running=`ps ax | grep -v grep | grep $in_use_name | wc -l` #not reliable with bash -e (if not running, check throws error):
if [ $running -gt 0 ]; then #running=`ps ax | grep -v grep | grep $in_use_name | wc -l`
echo "killing minetest processes..." #if [ $running -gt 0 ]; then
killall $in_use_name # echo "killing minetest processes..."
fi # killall $in_use_name
wget -O $zip_name https://downloads.minetest.org/$zip_name || exit 1 #fi
url=https://downloads.minetest.org
wget -O $zip_name $url/$zip_name || echo "no $zip_name at $url" && exit 1
if [ -d "$extracted_name" ]; then if [ -d "$extracted_name" ]; then
if [ "`ls -lR $extracted_name/minetest/bin/*.png | wc -l`" -gt 0 ]; then if [ "`ls -lR $extracted_name/minetest/bin/*.png | wc -l`" -gt 0 ]; then
if [ ! -d screenshots ]; then mkdir screenshots; fi if [ ! -d screenshots ]; then mkdir screenshots; fi

Loading…
Cancel
Save