From b9f67ba9ae9aab7fc854136f3abdf6de375c1ed9 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Thu, 18 Jan 2018 19:26:45 +1000 Subject: [PATCH] Reorganize, add setup script --- {ansis_default => dist/ansis}/bulletin0.ans | Bin {ansis_default => dist/ansis}/bulletin1.ans | Bin {ansis_default => dist/ansis}/doors.ans | Bin {ansis_default => dist/ansis}/filemenu.ans | Bin {ansis_default => dist/ansis}/goodbye.ans | Bin {ansis_default => dist/ansis}/issue.ans | Bin {ansis_default => dist/ansis}/logoff.ans | Bin {ansis_default => dist/ansis}/mailmenu.ans | Bin {ansis_default => dist/ansis}/mainmenu.ans | Bin {ansis_default => dist/ansis}/newuser.ans | Bin {config_default => dist/config}/archivers.ini | 0 {config_default => dist/config}/bbs.ini | 0 {config_default => dist/config}/doors.ini | 0 {config_default => dist/config}/filesgen.ini | 0 .../config}/illusionnet.ini | 0 {config_default => dist/config}/localmail.ini | 0 {config_default => dist/config}/protocols.ini | 0 {config_default => dist/config}/s10.ini | 0 magicka.strings => dist/magicka.strings | 0 {menus_default => dist/menus}/doors.mnu | 0 {menus_default => dist/menus}/file.mnu | 0 {menus_default => dist/menus}/logoff.mnu | 0 {menus_default => dist/menus}/mail.mnu | 0 {menus_default => dist/menus}/main.mnu | 0 {scripts_examples => dist/scripts}/doors.lua | 0 .../scripts}/filemenu.lua | 0 .../scripts}/login_stanza.lua | 0 .../scripts}/logout_stanza.lua | 0 .../scripts}/logout_stanza_bbsads.lua | 0 .../scripts}/mailmenu.lua | 0 .../scripts}/mainmenu.lua | 0 .../scripts}/taglines.txt | 0 {www => dist/www}/401.tpl | 0 {www => dist/www}/403.tpl | 0 {www => dist/www}/404.tpl | 0 {www => dist/www}/footer.tpl | 0 {www => dist/www}/header.tpl | 0 {www => dist/www}/index.tpl | 0 {www => dist/www}/mime.types | 0 {www => dist/www}/static/delete.png | Bin {www => dist/www}/static/fonts/LICENSE.TXT | 0 .../static/fonts/pxplus_ibm_vga8-webfont.svg | 0 .../static/fonts/pxplus_ibm_vga8-webfont.woff | Bin .../fonts/pxplus_ibm_vga8-webfont.woff2 | Bin {www => dist/www}/static/header.png | Bin {www => dist/www}/static/style.css | 0 setup.sh | 75 ++++++++++++++++++ 47 files changed, 75 insertions(+) rename {ansis_default => dist/ansis}/bulletin0.ans (100%) rename {ansis_default => dist/ansis}/bulletin1.ans (100%) rename {ansis_default => dist/ansis}/doors.ans (100%) rename {ansis_default => dist/ansis}/filemenu.ans (100%) rename {ansis_default => dist/ansis}/goodbye.ans (100%) rename {ansis_default => dist/ansis}/issue.ans (100%) rename {ansis_default => dist/ansis}/logoff.ans (100%) rename {ansis_default => dist/ansis}/mailmenu.ans (100%) rename {ansis_default => dist/ansis}/mainmenu.ans (100%) rename {ansis_default => dist/ansis}/newuser.ans (100%) rename {config_default => dist/config}/archivers.ini (100%) rename {config_default => dist/config}/bbs.ini (100%) rename {config_default => dist/config}/doors.ini (100%) rename {config_default => dist/config}/filesgen.ini (100%) rename {config_default => dist/config}/illusionnet.ini (100%) rename {config_default => dist/config}/localmail.ini (100%) rename {config_default => dist/config}/protocols.ini (100%) rename {config_default => dist/config}/s10.ini (100%) rename magicka.strings => dist/magicka.strings (100%) rename {menus_default => dist/menus}/doors.mnu (100%) rename {menus_default => dist/menus}/file.mnu (100%) rename {menus_default => dist/menus}/logoff.mnu (100%) rename {menus_default => dist/menus}/mail.mnu (100%) rename {menus_default => dist/menus}/main.mnu (100%) rename {scripts_examples => dist/scripts}/doors.lua (100%) rename {scripts_examples => dist/scripts}/filemenu.lua (100%) rename {scripts_examples => dist/scripts}/login_stanza.lua (100%) rename {scripts_examples => dist/scripts}/logout_stanza.lua (100%) rename {scripts_examples => dist/scripts}/logout_stanza_bbsads.lua (100%) rename {scripts_examples => dist/scripts}/mailmenu.lua (100%) rename {scripts_examples => dist/scripts}/mainmenu.lua (100%) rename {scripts_examples => dist/scripts}/taglines.txt (100%) rename {www => dist/www}/401.tpl (100%) rename {www => dist/www}/403.tpl (100%) rename {www => dist/www}/404.tpl (100%) rename {www => dist/www}/footer.tpl (100%) rename {www => dist/www}/header.tpl (100%) rename {www => dist/www}/index.tpl (100%) rename {www => dist/www}/mime.types (100%) rename {www => dist/www}/static/delete.png (100%) rename {www => dist/www}/static/fonts/LICENSE.TXT (100%) rename {www => dist/www}/static/fonts/pxplus_ibm_vga8-webfont.svg (100%) rename {www => dist/www}/static/fonts/pxplus_ibm_vga8-webfont.woff (100%) rename {www => dist/www}/static/fonts/pxplus_ibm_vga8-webfont.woff2 (100%) rename {www => dist/www}/static/header.png (100%) rename {www => dist/www}/static/style.css (100%) create mode 100755 setup.sh diff --git a/ansis_default/bulletin0.ans b/dist/ansis/bulletin0.ans similarity index 100% rename from ansis_default/bulletin0.ans rename to dist/ansis/bulletin0.ans diff --git a/ansis_default/bulletin1.ans b/dist/ansis/bulletin1.ans similarity index 100% rename from ansis_default/bulletin1.ans rename to dist/ansis/bulletin1.ans diff --git a/ansis_default/doors.ans b/dist/ansis/doors.ans similarity index 100% rename from ansis_default/doors.ans rename to dist/ansis/doors.ans diff --git a/ansis_default/filemenu.ans b/dist/ansis/filemenu.ans similarity index 100% rename from ansis_default/filemenu.ans rename to dist/ansis/filemenu.ans diff --git a/ansis_default/goodbye.ans b/dist/ansis/goodbye.ans similarity index 100% rename from ansis_default/goodbye.ans rename to dist/ansis/goodbye.ans diff --git a/ansis_default/issue.ans b/dist/ansis/issue.ans similarity index 100% rename from ansis_default/issue.ans rename to dist/ansis/issue.ans diff --git a/ansis_default/logoff.ans b/dist/ansis/logoff.ans similarity index 100% rename from ansis_default/logoff.ans rename to dist/ansis/logoff.ans diff --git a/ansis_default/mailmenu.ans b/dist/ansis/mailmenu.ans similarity index 100% rename from ansis_default/mailmenu.ans rename to dist/ansis/mailmenu.ans diff --git a/ansis_default/mainmenu.ans b/dist/ansis/mainmenu.ans similarity index 100% rename from ansis_default/mainmenu.ans rename to dist/ansis/mainmenu.ans diff --git a/ansis_default/newuser.ans b/dist/ansis/newuser.ans similarity index 100% rename from ansis_default/newuser.ans rename to dist/ansis/newuser.ans diff --git a/config_default/archivers.ini b/dist/config/archivers.ini similarity index 100% rename from config_default/archivers.ini rename to dist/config/archivers.ini diff --git a/config_default/bbs.ini b/dist/config/bbs.ini similarity index 100% rename from config_default/bbs.ini rename to dist/config/bbs.ini diff --git a/config_default/doors.ini b/dist/config/doors.ini similarity index 100% rename from config_default/doors.ini rename to dist/config/doors.ini diff --git a/config_default/filesgen.ini b/dist/config/filesgen.ini similarity index 100% rename from config_default/filesgen.ini rename to dist/config/filesgen.ini diff --git a/config_default/illusionnet.ini b/dist/config/illusionnet.ini similarity index 100% rename from config_default/illusionnet.ini rename to dist/config/illusionnet.ini diff --git a/config_default/localmail.ini b/dist/config/localmail.ini similarity index 100% rename from config_default/localmail.ini rename to dist/config/localmail.ini diff --git a/config_default/protocols.ini b/dist/config/protocols.ini similarity index 100% rename from config_default/protocols.ini rename to dist/config/protocols.ini diff --git a/config_default/s10.ini b/dist/config/s10.ini similarity index 100% rename from config_default/s10.ini rename to dist/config/s10.ini diff --git a/magicka.strings b/dist/magicka.strings similarity index 100% rename from magicka.strings rename to dist/magicka.strings diff --git a/menus_default/doors.mnu b/dist/menus/doors.mnu similarity index 100% rename from menus_default/doors.mnu rename to dist/menus/doors.mnu diff --git a/menus_default/file.mnu b/dist/menus/file.mnu similarity index 100% rename from menus_default/file.mnu rename to dist/menus/file.mnu diff --git a/menus_default/logoff.mnu b/dist/menus/logoff.mnu similarity index 100% rename from menus_default/logoff.mnu rename to dist/menus/logoff.mnu diff --git a/menus_default/mail.mnu b/dist/menus/mail.mnu similarity index 100% rename from menus_default/mail.mnu rename to dist/menus/mail.mnu diff --git a/menus_default/main.mnu b/dist/menus/main.mnu similarity index 100% rename from menus_default/main.mnu rename to dist/menus/main.mnu diff --git a/scripts_examples/doors.lua b/dist/scripts/doors.lua similarity index 100% rename from scripts_examples/doors.lua rename to dist/scripts/doors.lua diff --git a/scripts_examples/filemenu.lua b/dist/scripts/filemenu.lua similarity index 100% rename from scripts_examples/filemenu.lua rename to dist/scripts/filemenu.lua diff --git a/scripts_examples/login_stanza.lua b/dist/scripts/login_stanza.lua similarity index 100% rename from scripts_examples/login_stanza.lua rename to dist/scripts/login_stanza.lua diff --git a/scripts_examples/logout_stanza.lua b/dist/scripts/logout_stanza.lua similarity index 100% rename from scripts_examples/logout_stanza.lua rename to dist/scripts/logout_stanza.lua diff --git a/scripts_examples/logout_stanza_bbsads.lua b/dist/scripts/logout_stanza_bbsads.lua similarity index 100% rename from scripts_examples/logout_stanza_bbsads.lua rename to dist/scripts/logout_stanza_bbsads.lua diff --git a/scripts_examples/mailmenu.lua b/dist/scripts/mailmenu.lua similarity index 100% rename from scripts_examples/mailmenu.lua rename to dist/scripts/mailmenu.lua diff --git a/scripts_examples/mainmenu.lua b/dist/scripts/mainmenu.lua similarity index 100% rename from scripts_examples/mainmenu.lua rename to dist/scripts/mainmenu.lua diff --git a/scripts_examples/taglines.txt b/dist/scripts/taglines.txt similarity index 100% rename from scripts_examples/taglines.txt rename to dist/scripts/taglines.txt diff --git a/www/401.tpl b/dist/www/401.tpl similarity index 100% rename from www/401.tpl rename to dist/www/401.tpl diff --git a/www/403.tpl b/dist/www/403.tpl similarity index 100% rename from www/403.tpl rename to dist/www/403.tpl diff --git a/www/404.tpl b/dist/www/404.tpl similarity index 100% rename from www/404.tpl rename to dist/www/404.tpl diff --git a/www/footer.tpl b/dist/www/footer.tpl similarity index 100% rename from www/footer.tpl rename to dist/www/footer.tpl diff --git a/www/header.tpl b/dist/www/header.tpl similarity index 100% rename from www/header.tpl rename to dist/www/header.tpl diff --git a/www/index.tpl b/dist/www/index.tpl similarity index 100% rename from www/index.tpl rename to dist/www/index.tpl diff --git a/www/mime.types b/dist/www/mime.types similarity index 100% rename from www/mime.types rename to dist/www/mime.types diff --git a/www/static/delete.png b/dist/www/static/delete.png similarity index 100% rename from www/static/delete.png rename to dist/www/static/delete.png diff --git a/www/static/fonts/LICENSE.TXT b/dist/www/static/fonts/LICENSE.TXT similarity index 100% rename from www/static/fonts/LICENSE.TXT rename to dist/www/static/fonts/LICENSE.TXT diff --git a/www/static/fonts/pxplus_ibm_vga8-webfont.svg b/dist/www/static/fonts/pxplus_ibm_vga8-webfont.svg similarity index 100% rename from www/static/fonts/pxplus_ibm_vga8-webfont.svg rename to dist/www/static/fonts/pxplus_ibm_vga8-webfont.svg diff --git a/www/static/fonts/pxplus_ibm_vga8-webfont.woff b/dist/www/static/fonts/pxplus_ibm_vga8-webfont.woff similarity index 100% rename from www/static/fonts/pxplus_ibm_vga8-webfont.woff rename to dist/www/static/fonts/pxplus_ibm_vga8-webfont.woff diff --git a/www/static/fonts/pxplus_ibm_vga8-webfont.woff2 b/dist/www/static/fonts/pxplus_ibm_vga8-webfont.woff2 similarity index 100% rename from www/static/fonts/pxplus_ibm_vga8-webfont.woff2 rename to dist/www/static/fonts/pxplus_ibm_vga8-webfont.woff2 diff --git a/www/static/header.png b/dist/www/static/header.png similarity index 100% rename from www/static/header.png rename to dist/www/static/header.png diff --git a/www/static/style.css b/dist/www/static/style.css similarity index 100% rename from www/static/style.css rename to dist/www/static/style.css diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..6ffcd8d --- /dev/null +++ b/setup.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +printstuff() { + YELLOW='\033[0;33m' + NC='\033[0m' + echo -e "${YELLOW}$1${NC}" +} + +USERNAME=`whoami` +PWD=`pwd` + +if [ ! -e ./ansis ]; then + cp -r dist/ansis . +fi + +if [ ! -e ./config ]; then + cp -r dist/config . +fi + +if [ ! -e ./menus ]; then + cp -r dist/menus . +fi + +if [ ! -e ./scripts ]; then + cp -r dist/scripts . +fi + +if [ ! -e ./magicka.strings ]; then + ln -s dist/magicka.strings magicka.strings +fi + +if [ ! -e ./www ]; then + ln -s dist/www www +fi + +if [ ! -e ./logs ]; then + mkdir logs +fi + +if [ ! -e ./msgs ]; then + mkdir msgs +fi + +if [ ! -e ./files ]; then + mkdir -p files/misc +fi + +printstuff "Please enter your real first and last name:" + +read firstname lastname + +printstuff "Please enter your user handle:" + +read -e handle + +printstuff "Please enter your location:" + +read -e location + +printstuff "Please enter the name of your BBS:" + +read -e bbsname + +sed -i "s@/home/andrew/MagickaBBS@${PWD}@g" config/bbs.ini +sed -i "s/BBS Name = Magicka BBS/BBS Name = ${bbsname}/g" config/bbs.ini +sed -i "s/Sysop Name = sysop/Sysop Name = ${handle}/g" config/bbs.ini +sed -i "s@/home/andrew/MagickaBBS@${PWD}@g" config/localmail.ini +sed -i "s@/home/andrew/MagickaBBS@${PWD}@g" config/filesgen.ini +sed -i "s@/home/andrew/MagickaBBS@${PWD}@g" config/illusionnet.ini +sed -i "s@/home/andrew/MagickaBBS@${PWD}@g" utils/magiedit/magiedit.sh +sed -i "s@/home/andrew/MagickaBBS@${PWD}@g" scripts/login_stanza.lua +sed -i "s/MagiChat Server = localhost/; MagiChat Server = localhost/g" config/bbs.ini +sed -i "s/Default Tagline = Brought to you by Another Magicka BBS!/Default Tagline = ${bbsname}/g" config/bbs.ini +sed -i "s/echomail.out/mail.out/g" config/bbs.ini +sed -i "s/netmail.out/mail.out/g" config/bbs.ini