Browse Source

fixing shell script bugs

etc
master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
05aa0a813d
  1. 4
      expertmmregressionsuite.py
  2. 12
      install-chunkymap-on-ubuntu.sh
  3. 8
      minetestinfo.py
  4. 5
      minetestoffline.py

4
expertmmregressionsuite.py

@ -20,7 +20,11 @@ from expertmm import *
# * check for only variable name in quotes (maybe the programmer meant to use the value) # * check for only variable name in quotes (maybe the programmer meant to use the value)
# * check for use of os.dirname (should be os.path.dirname) # * check for use of os.dirname (should be os.path.dirname)
# * mixing width with y (or height or z) and mixing height with x (or width) # * mixing width with y (or height or z) and mixing height with x (or width)
# PHP:
# * using '+' next to '"' in php seperated only by whitespace (probably meant concatenate operator '.') # * using '+' next to '"' in php seperated only by whitespace (probably meant concatenate operator '.')
# SHELL SCRIPT:
# * don't use '*' inside quotes (fails)
# * using HOME without preceding dollar sign
def view_traceback(): def view_traceback():
ex_type, ex, tb = sys.exc_info() ex_type, ex, tb = sys.exc_info()

12
install-chunkymap-on-ubuntu.sh

@ -89,12 +89,14 @@ chmod -x "$CHUNKYMAP_DEST/unused/set-minutely-crontab-job.sh"
chmod -x "$CHUNKYMAP_DEST/unused/set-minutely-players-crontab-job.sh" chmod -x "$CHUNKYMAP_DEST/unused/set-minutely-players-crontab-job.sh"
#if [ -f "$HOME/update-chunkymap-on-ubuntu-from-web.sh" ]; then #if [ -f "$HOME/update-chunkymap-on-ubuntu-from-web.sh" ]; then
cp -f "HOME/chunkymap/update-chunkymap-on-ubuntu-from-web.sh" "HOME/update-chunkymap-on-ubuntu-from-web.sh" cp -f "$HOME/chunkymap/update-chunkymap-on-ubuntu-from-web.sh" "$HOME/"
#fi #fi
#cp -f "HOME/chunkymap/install-chunkymap-on-ubuntu-from-web.sh" "HOME/install-chunkymap-on-ubuntu-from-web.sh" #cp -f "$HOME/chunkymap/install-chunkymap-on-ubuntu-from-web.sh" "$HOME/install-chunkymap-on-ubuntu-from-web.sh"
rm "HOME/install-chunkymap-on-ubuntu-from-web.sh"
rm "HOME/mapper-refresh-minetestserver.bat" #remove deprecated stuff
rm "HOME/mapper-refresh-minetestserver" #rm "$HOME/install-chunkymap-on-ubuntu-from-web.sh"
#rm "$HOME/mapper-refresh-minetestserver.bat"
#rm "$HOME/mapper-refresh-minetestserver"
sudo apt-get install python-numpy python-pil python-leveldb sudo apt-get install python-numpy python-pil python-leveldb
echo "" echo ""

8
minetestinfo.py

@ -42,7 +42,13 @@ after_broken["default:stone_with_diamond"] = "default:diamond"
#after_broken[""] = "" #after_broken[""] = ""
#after_broken[""] = "" #after_broken[""] = ""
#after_broken[""] = "" #after_broken[""] = ""
#after_broken[""] = ""
after_broken_startswith = {}
after_broken_startswith["pipeworks:mese_tube_"] = "pipeworks:mese_tube_000000"
after_broken_startswith["pipeworks:conductor_tube_off_"] = "pipeworks:conductor_tube_off_1"
after_broken_startswith["pipeworks:tube_"] = "pipeworks:tube_1"
after_broken_startswith["Item pipeworks:accelerator_tube_"] = "pipeworks:accelerator_tube_1"
genresult_name_closer_string = "_mapper_result.txt" genresult_name_closer_string = "_mapper_result.txt"

5
minetestoffline.py

@ -590,6 +590,11 @@ def debug_log_replay_to_offline_player_storage(debug_txt_path, this_players_offl
if "digs" in name_ender: if "digs" in name_ender:
if item_string in after_broken: if item_string in after_broken:
item_string = after_broken[item_string] item_string = after_broken[item_string]
else:
for item_startswith in after_broken_startswith:
if item_startswith == item_string[:len(item_startswith)]:
item_string = after_broken_startswith[item_startswith]
break
print(" "+item_string) print(" "+item_string)
if playerid not in players: if playerid not in players:
players[playerid] = {} players[playerid] = {}

Loading…
Cancel
Save