From 50a95328c5ae2b47f6613f6a92a08804c1329ee1 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Tue, 22 Mar 2016 20:44:07 -0400 Subject: [PATCH] working on updater no longer writes stuff being written, hopefully --- README.md | 14 +++++++++----- install-chunkymap-on-ubuntu-from-web.sh | 20 ++++++++++++++------ rename-deprecated.sh | 4 +++- update-chunkymap-on-ubuntu-from-web.sh | 22 +++++++++++----------- 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 09295c9..4c2b433 100644 --- a/README.md +++ b/README.md @@ -83,13 +83,17 @@ world_path * Install the git version of minetest (or otherwise install 0.4.13 or other version compatible with the map generators used by chunkymap) such as: #if you have a version before 2016-03-23: + rm rename-deprecated.sh wget https://github.com/expertmm/minetest-chunkymap/raw/master/rename-deprecated.sh - sh rename-deprecated.sh + sudo sh rename-deprecated.sh - wget https://github.com/expertmm/minetest-chunkymap/raw/master/install-chunkymap-on-ubuntu-from-web.sh - chmod +x install-chunkymap-on-ubuntu-from-web.sh - wget https://github.com/expertmm/minetest-chunkymap/raw/master/update-chunkymap-on-ubuntu-from-web.sh - chmod +x update-chunkymap-on-ubuntu-from-web.sh +rm install-chunkymap-on-ubuntu-from-web.sh +wget https://github.com/expertmm/minetest-chunkymap/raw/master/install-chunkymap-on-ubuntu-from-web.sh +chmod +x install-chunkymap-on-ubuntu-from-web.sh +./install-chunkymap-on-ubuntu-from-web.sh +rm update-chunkymap-on-ubuntu-from-web.sh +wget https://github.com/expertmm/minetest-chunkymap/raw/master/update-chunkymap-on-ubuntu-from-web.sh +chmod +x update-chunkymap-on-ubuntu-from-web.sh OPTION 2: IF you are using Ubuntu go to a terminal, cd to this directory, then switch user to the one that will run minetestserver (since install-chunkymap-on-ubuntu.sh DOES replace "/home/owner" with current user's home [replace-with-current-user.py, which is automatically called by install, will change /home/owner to current user's directory in each script that install copies to $HOME/chunkymap]) diff --git a/install-chunkymap-on-ubuntu-from-web.sh b/install-chunkymap-on-ubuntu-from-web.sh index c972feb..a858360 100644 --- a/install-chunkymap-on-ubuntu-from-web.sh +++ b/install-chunkymap-on-ubuntu-from-web.sh @@ -9,14 +9,22 @@ fi #./update-chunkymap-installer-only.sh: cd $HOME/Downloads -rm master.zip +if [ -f master.zip ]; then + rm master.zip +fi wget https://github.com/expertmm/minetest-chunkymap/archive/master.zip -rm -f minetest-chunkymap.zip +if [ -f minetest-chunkymap.zip ]; then + rm -f minetest-chunkymap.zip +fi mv master.zip minetest-chunkymap.zip -rm -Rf minetest-chunkymap-master +if [ -d minetest-chunkymap-master ]; then + rm -Rf minetest-chunkymap-master +fi unzip minetest-chunkymap.zip #mv minetest-chunkymap-master minetest-chunkymap -rm -Rf "$CHUNKYMAP_INSTALLER_DIR" +if [ -d "$CHUNKYMAP_INSTALLER_DIR"]; then + rm -Rf "$CHUNKYMAP_INSTALLER_DIR" +fi mv minetest-chunkymap-master "$CHUNKYMAP_INSTALLER_DIR" #cd minetest-chunkymap chmod +x "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu.sh" @@ -25,8 +33,8 @@ chmod +x "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-on-ubuntu-from-web.sh" chmod +x "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu-from-web.sh" #mv -f "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu.sh" "$HOME/Downloads/" -mv -f "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-on-ubuntu-from-web.sh" "$HOME/Downloads/" -mv -f "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu-from-web.sh" "$HOME/Downloads/" +#mv -f "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-on-ubuntu-from-web.sh" "$HOME/Downloads/" +#mv -f "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu-from-web.sh" "$HOME/Downloads/" chmod +x "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu.sh" diff --git a/rename-deprecated.sh b/rename-deprecated.sh index 0159b46..db5b9e0 100644 --- a/rename-deprecated.sh +++ b/rename-deprecated.sh @@ -20,7 +20,7 @@ fi mv "$CHUNKYMAP_DEPRECATED_PATH/web" "$CHUNKYMAP_DEST_PATH/web" mv "$CHUNKYMAP_DEPRECATED_PATH/unused" "$CHUNKYMAP_DEST_PATH/unused" -mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-genresults" "$CHUNKYMAP_DEST_PATH/chunkymap-genresults" +sudo mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-genresults" "$CHUNKYMAP_DEST_PATH/chunkymap-genresults" mv "$CHUNKYMAP_DEPRECATED_PATH/archivedebug.py" "$CHUNKYMAP_DEST_PATH/archivedebug.py" mv "$CHUNKYMAP_DEPRECATED_PATH/colors-missing.txt" "$CHUNKYMAP_DEST_PATH/colors-missing.txt" mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-erase-png-files-in-www-minetest-chunkymapdata.bat" "$CHUNKYMAP_DEST_PATH/erase-png-files-in-www-minetest-chunkymapdata.bat" @@ -65,6 +65,8 @@ mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-signals example - no player update.txt" mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-signals example - prevent or cancel map refresh.txt" "$CHUNKYMAP_DEST_PATH/signals example - prevent or cancel map refresh.txt" mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-signals example - stop looping.txt" "$CHUNKYMAP_DEST_PATH/signals example - stop looping.txt" mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-signals example - verbose_enable True.txt" "$CHUNKYMAP_DEST_PATH/signals example - verbose_enable True.txt" +mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-signals example - turn on verbose.txt" "$CHUNKYMAP_DEST_PATH/signals example - verbose_enable True.txt" mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-update C wamp www.bat" "$CHUNKYMAP_DEST_PATH/update C wamp www.bat" +sudo mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap.yml" "$CHUNKYMAP_DEST_PATH/chunkymap.yml" diff --git a/update-chunkymap-on-ubuntu-from-web.sh b/update-chunkymap-on-ubuntu-from-web.sh index 3d3b237..8e191ec 100644 --- a/update-chunkymap-on-ubuntu-from-web.sh +++ b/update-chunkymap-on-ubuntu-from-web.sh @@ -20,14 +20,14 @@ cd $HOME #mv -f update-chunkymap-installer-only.sh "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-installer-only.sh" #fi #sh "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-installer-only.sh" -if [ -f "$CHUNKYMAP_DEST/update-chunkymap-installer-only.sh" ]; then - sh "$CHUNKYMAP_DEST/update-chunkymap-installer-only.sh" - #further instructions are in separate file in case updater was updated (sleep first otherwise file won't be finished writing): - sleep .25 - sh "$CHUNKYMAP_DEST/post-update.sh" -else - sh "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-installer-only.sh" - #further instructions are in separate file in case updater was updated (sleep first otherwise file won't be finished writing): - sleep .25 - sh "$CHUNKYMAP_INSTALLER_DIR/post-update.sh" -fi +#if [ -f "$CHUNKYMAP_DEST/update-chunkymap-installer-only.sh" ]; then +# sh "$CHUNKYMAP_DEST/update-chunkymap-installer-only.sh" +# #further instructions are in separate file in case updater was updated (sleep first otherwise file won't be finished writing): +# sleep .25 +# sh "$CHUNKYMAP_INSTALLER_DIR/post-update.sh" +#else + sh "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-installer-only.sh" + #further instructions are in separate file in case updater was updated (sleep first otherwise file won't be finished writing): + sleep .2 + sh "$CHUNKYMAP_INSTALLER_DIR/post-update.sh" +#fi