Browse Source

working on accounting for new names

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
966a0de20e
  1. 2
      chunkymap-generator.sh
  2. 52
      install-chunkymap-on-ubuntu.sh
  3. 8
      rename-deprecated.sh
  4. 2
      replace-with-current-user.py

2
chunkymap-generator.sh

@ -6,4 +6,4 @@ echo
# -S names the socket (-t only sets the title)
#FAILS: flock -n /var/run/chunkymap-loop.lockfile -c "screen -S chunkymapregen python /home/owner/minetest/util/chunkymap-regen.py"
#FAILS: screen -S chunkymapregen flock -n /var/run/chunkymap-loop.lockfile -c python /home/owner/minetest/util/chunkymap-regen.py
sudo screen -S chunkymapregen python /home/owner/minetest/util/chunkymap-regen.py
sudo screen -S chunkymapregen python /home/owner/chunkymap/generator.py

52
install-chunkymap-on-ubuntu.sh

@ -32,52 +32,46 @@ rm $CHUNKYMAP_DEST/*.bat
rm "$CHUNKYMAP_DEST/install-chunkymap-on-windows.py"
#region DEPRECATED
if [ ! -d "$CHUNKYMAP_DEST" ]; then
#if [ ! -d "$CHUNKYMAP_DEST" ]; then
cp -f "$CHUNKYMAP_INSTALLER_PATH/chunkymap-regen.py" "$CHUNKYMAP_DEST/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/chunkymap-regen.py" "$CHUNKYMAP_DEST/"
#chmod +x "$CHUNKYMAP_DEST/chunkymap-regen.py"
cp -f "$CHUNKYMAP_INSTALLER_PATH/README.md" "$CHUNKYMAP_DEST/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/README.md" "$CHUNKYMAP_DEST/"
#remove files place in dest by old version of installer script:
rm -f "$CHUNKYMAP_DEST/chunkymap-regen.sh"
rm -f "$CHUNKYMAP_DEST/chunkymap-regen-players.sh"
rm -f "$CHUNKYMAP_DEST/chunkymap-cronjob"
rm -f "$CHUNKYMAP_DEST/chunkymap-players-cronjob"
rm -f "$CHUNKYMAP_DEST/set-minutely-players-crontab-job.sh"
rm -f "$CHUNKYMAP_DEST/set-minutely-crontab-job.sh"
#install scripts:
cp -f "$CHUNKYMAP_INSTALLER_PATH/chunkymap-regen-loop.sh" "$CHUNKYMAP_DEST/"
#install scripts (already done above with wildcard so commented lines below are deprecated):
#cp -f "$CHUNKYMAP_INSTALLER_PATH/chunkymap-generator.sh" "$CHUNKYMAP_DEST/"
#install not-recommended scripts:
cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-regen.sh" "$CHUNKYMAP_DEST/unused/"
cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-regen-players.sh" "$CHUNKYMAP_DEST/unused/"
cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-cronjob" "$CHUNKYMAP_DEST/unused/"
cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-players-cronjob" "$CHUNKYMAP_DEST/unused/"
cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/set-minutely-players-crontab-job.sh" "$CHUNKYMAP_DEST/unused/"
cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/set-minutely-crontab-job.sh" "$CHUNKYMAP_DEST/unused/"
if [ ! -d "$CHUNKYMAP_DEST/web" ]; then
mkdir "$CHUNKYMAP_DEST/web"
fi
cp -Rf "$CHUNKYMAP_INSTALLER_PATH/web" "$CHUNKYMAP_DEST/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-regen.sh" "$CHUNKYMAP_DEST/unused/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-regen-players.sh" "$CHUNKYMAP_DEST/unused/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-cronjob" "$CHUNKYMAP_DEST/unused/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-players-cronjob" "$CHUNKYMAP_DEST/unused/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/set-minutely-players-crontab-job.sh" "$CHUNKYMAP_DEST/unused/"
#cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/set-minutely-crontab-job.sh" "$CHUNKYMAP_DEST/unused/"
#if [ ! -d "$CHUNKYMAP_DEST/web" ]; then
# mkdir "$CHUNKYMAP_DEST/web"
#fi
#cp -Rf "$CHUNKYMAP_INSTALLER_PATH/web" "$CHUNKYMAP_DEST/"
#if [ ! -d "$CHUNKYMAP_DEST/chunkymap" ]; then
# mkdir "$CHUNKYMAP_DEST/chunkymap"
#fi
cp -f "$CHUNKYMAP_INSTALLER_PATH/minetestmapper-expertmm.py" "$CHUNKYMAP_DEST/"
cp --no-clobber $CHUNKYMAP_INSTALLER_PATH/chunkymap-signals* "$CHUNKYMAP_DEST/"
cd "$CHUNKYMAP_INSTALLER_PATH"
python replace-with-current-user.py # the py file only manipulates the minetest/util directory
#cp -f "$CHUNKYMAP_INSTALLER_PATH/minetestmapper-expertmm.py" "$CHUNKYMAP_DEST/"
#cp --no-clobber $CHUNKYMAP_INSTALLER_PATH/chunkymap-signals* "$CHUNKYMAP_DEST/"
#cd "$CHUNKYMAP_INSTALLER_PATH"
python replace-with-current-user.py # the py file only manipulates the shell scripts that must run as root but use regular user's minetest
# so chmod those files AFTER running the py above (since it rewrites them and therefore removes x attribute if present):
fi
#fi
#endregion DEPRECATED
chmod +x "$CHUNKYMAP_DEST/chunkymap-regen-loop.sh"
chmod +x "$CHUNKYMAP_DEST/chunkymap-generator.sh"
chmod -x "$CHUNKYMAP_DEST/unused/chunkymap-regen.sh"
chmod -x "$CHUNKYMAP_DEST/unused/chunkymap-regen-players.sh"
chmod -x "$CHUNKYMAP_DEST/unused/chunkymap-cronjob"
@ -106,9 +100,9 @@ echo "To learn more about chunkymap:"
echo "nano $CHUNKYMAP_DEST/README.md"
echo
echo "To start now assuming configuration matches yours (nano $CHUNKYMAP_DEST/README.md before this):"
echo sh minetest/util/chunkymap-regen-loop.sh
echo sh minetest/util/chunkymap-generator.sh
echo
# NOTE: colors.txt should ALREADY be in $HOME/minetest/util
# NOTE: colors.txt is generated now, so shouldn't be in $CHUNKYMAP_DEST until first run (first time minetestinfo.py is included by one of the other py files)
fi

8
rename-deprecated.sh

@ -18,6 +18,14 @@ if [ -d "$HOME/minetest-stuff/minetest-chunkymap" ]; then
rm -Rf $HOME/minetest-stuff/minetest-chunkymap
fi
rm -f "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-regen.sh"
rm -f "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-regen-players.sh"
rm -f "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-cronjob"
rm -f "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-players-cronjob"
rm -f "$CHUNKYMAP_DEPRECATED_PATH/set-minutely-players-crontab-job.sh"
rm -f "$CHUNKYMAP_DEPRECATED_PATH/set-minutely-crontab-job.sh"
mv "$CHUNKYMAP_DEPRECATED_PATH/web" "$CHUNKYMAP_DEST_PATH/web"
mv "$CHUNKYMAP_DEPRECATED_PATH/unused" "$CHUNKYMAP_DEST_PATH/unused"
sudo mv "$CHUNKYMAP_DEPRECATED_PATH/chunkymap-genresults" "$CHUNKYMAP_DEST_PATH/chunkymap-genresults"

2
replace-with-current-user.py

@ -9,7 +9,7 @@ filenames.append(os.path.join("unused","chunkymap-regen-players.sh"))
filenames.append(os.path.join("unused","chunkymap-regen.sh"))
filenames.append(os.path.join("unused","set-minutely-players-crontab-job.sh"))
filenames.append(os.path.join("unused","set-minutely-crontab-job.sh"))
filenames.append("chunkymap-regen-loop.sh")
filenames.append("chunkymap-generator.sh")
home_path = expanduser("~")
home_minetest_chunkymap_path = os.path.join(home_path,"chunkymap")

Loading…
Cancel
Save