Browse Source

working on updater

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
8628c37b78
  1. 2
      README.md
  2. 3
      update-chunkymap-installer-only.sh
  3. 9
      update-chunkymap-on-ubuntu-from-web.sh

2
README.md

@ -93,7 +93,9 @@ chmod +x install-chunkymap-on-ubuntu-from-web.sh
./install-chunkymap-on-ubuntu-from-web.sh ./install-chunkymap-on-ubuntu-from-web.sh
rm update-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 wget https://github.com/expertmm/minetest-chunkymap/raw/master/update-chunkymap-on-ubuntu-from-web.sh
sleep 1
chmod +x update-chunkymap-on-ubuntu-from-web.sh chmod +x update-chunkymap-on-ubuntu-from-web.sh
./update-chunkymap-on-ubuntu-from-web.sh
OPTION 2: IF you are using Ubuntu go to a terminal, cd to this directory, 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 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]) (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])

3
update-chunkymap-installer-only.sh

@ -1,8 +1,5 @@
#!/bin/sh #!/bin/sh
cd $HOME cd $HOME
if [ -d "$HOME/minetest-stuff/minetest-chunkymap" ]; then
rm -Rf $HOME/minetest-stuff/minetest-chunkymap
fi
CHUNKYMAP_INSTALLER_DIR=$HOME/Downloads/minetest-chunkymap CHUNKYMAP_INSTALLER_DIR=$HOME/Downloads/minetest-chunkymap
if [ ! -d "$HOME/Downloads" ]; then if [ ! -d "$HOME/Downloads" ]; then
mkdir "$HOME/Downloads" mkdir "$HOME/Downloads"

9
update-chunkymap-on-ubuntu-from-web.sh

@ -5,13 +5,18 @@ CHUNKYMAP_DEST=$HOME/chunkymap
if [ ! -d "$HOME/Downloads" ]; then if [ ! -d "$HOME/Downloads" ]; then
mkdir "$HOME/Downloads" mkdir "$HOME/Downloads"
fi fi
if [ ! -d "$CHUNKYMAP_INSTALLER_DIR" ]; then
mkdir "$CHUNKYMAP_INSTALLER_DIR"
fi
cd "$CHUNKYMAP_DEST" cd "$CHUNKYMAP_DEST"
if [ -f update-chunkymap-installer-only.sh ]; then
rm update-chunkymap-installer-only.sh rm update-chunkymap-installer-only.sh
fi
wget https://github.com/expertmm/minetest-chunkymap/blob/master/update-chunkymap-installer-only.sh wget https://github.com/expertmm/minetest-chunkymap/blob/master/update-chunkymap-installer-only.sh
sleep 2
mv -f update-chunkymap-installer-only.sh $CHUNKYMAP_INSTALLER_DIR/ mv -f update-chunkymap-installer-only.sh $CHUNKYMAP_INSTALLER_DIR/
#Wait to make sure nothing weirdly not finished downloading: #Wait to make sure nothing weirdly not finished downloading:
sleep .2
cd $HOME cd $HOME
#cd $CHUNKYMAP_INSTALLER_DIR #cd $CHUNKYMAP_INSTALLER_DIR
#chmod +x update-chunkymap-installer-only.sh #chmod +x update-chunkymap-installer-only.sh
@ -29,6 +34,6 @@ cd $HOME
#else #else
sh "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-installer-only.sh" 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): #further instructions are in separate file in case updater was updated (sleep first otherwise file won't be finished writing):
sleep .2 sleep 2
sh "$CHUNKYMAP_INSTALLER_DIR/post-update.sh" sh "$CHUNKYMAP_INSTALLER_DIR/post-update.sh"
#fi #fi

Loading…
Cancel
Save