From c706e2b59240f4fe5c0dc5e55d0c7c392a0f4d3c Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Mon, 7 Mar 2016 08:59:39 -0500 Subject: [PATCH] install web folder so py file can find it and install images --- install-chunkymap-on-ubuntu.sh | 5 +++++ update-chunkymap-on-ubuntu-from-web.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/install-chunkymap-on-ubuntu.sh b/install-chunkymap-on-ubuntu.sh index 1f30599..a97f559 100644 --- a/install-chunkymap-on-ubuntu.sh +++ b/install-chunkymap-on-ubuntu.sh @@ -44,6 +44,11 @@ cp -f "$CHUNKYMAP_INSTALLER_PATH/unused/chunkymap-cronjob" "$CHUNKYMAP_DEST/unus 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/web/" + #if [ ! -d "$CHUNKYMAP_DEST/chunkymap" ]; then # mkdir "$CHUNKYMAP_DEST/chunkymap" #fi diff --git a/update-chunkymap-on-ubuntu-from-web.sh b/update-chunkymap-on-ubuntu-from-web.sh index 5cad015..42ab77b 100644 --- a/update-chunkymap-on-ubuntu-from-web.sh +++ b/update-chunkymap-on-ubuntu-from-web.sh @@ -24,7 +24,7 @@ MT_MY_WEBSITE_PATH=/var/www/html/minetest if [ -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" ]; then if [ -f "$MT_MY_WEBSITE_PATH/chunkymap.php" ]; then sudo cp -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" "$MT_MY_WEBSITE_PATH/" - sudo cp --no-clobber "$HOME/Downloads/minetest-chunkymap/web/example.php" "$MT_MY_WEBSITE_PATH/map.php" + sudo cp --no-clobber "$HOME/Downloads/minetest-chunkymap/web/example.php" "$MT_MY_WEBSITE_PATH/viewchunkymap.php" # cannot put wildcard in quotes on unix sudo cp -R --no-clobber $HOME/Downloads/minetest-chunkymap/web/images/* "$MT_MY_WEBSITE_PATH/images/" #--no-clobber: do not overwrite existing