2018-01-18 09:26:45 +00:00
|
|
|
#!/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
|
2018-02-05 11:11:00 +00:00
|
|
|
ln -s dist/www-bootstrap www
|
2018-01-18 09:26:45 +00:00
|
|
|
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:"
|
|
|
|
|
2018-10-11 10:51:07 +00:00
|
|
|
read -e bbsname
|
2018-01-18 09:26:45 +00:00
|
|
|
|
2018-01-19 00:37:08 +00:00
|
|
|
PLATFORM=`uname`
|
|
|
|
|
2018-01-19 01:09:07 +00:00
|
|
|
if [[ "$PLATFORM" == 'FreeBSD' ]] || [[ "$PLATFORM" == 'Darwin' ]] || [[ "$PLATFORM" == 'DragonFly' ]]; then
|
2018-01-19 00:41:38 +00:00
|
|
|
SED=gsed
|
2018-01-19 00:37:08 +00:00
|
|
|
else
|
2018-01-19 00:41:38 +00:00
|
|
|
SED=sed
|
2018-01-19 00:37:08 +00:00
|
|
|
fi
|
|
|
|
|
2018-02-18 09:52:55 +00:00
|
|
|
|
2018-10-26 02:13:32 +00:00
|
|
|
$SED -i "s@__CONFIGPREFIX__/keys@${PWD}/keys@g" config/bbs.ini
|
2018-10-26 02:21:10 +00:00
|
|
|
$SED -i "s@__CONFIGPREFIX__@${PWD}/config@g" config/bbs.ini
|
2018-10-26 02:13:32 +00:00
|
|
|
$SED -i "s@__LOCALSTATEPREFIX__@${PWD}@g" config/bbs.ini
|
|
|
|
$SED -i "s@__SHAREPREFIX__@${PWD}@g" config/bbs.ini
|
|
|
|
$SED -i "s@__EXECPREFIX__@${PWD}/utils/magiedit/@g" config/bbs.ini
|
2018-01-19 00:37:08 +00:00
|
|
|
$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
|
2018-02-18 09:52:55 +00:00
|
|
|
$SED -i "s/USERNAME/${USERNAME}/g" config/bbs.ini
|
2018-10-26 02:13:32 +00:00
|
|
|
$SED -i "s@__LOCALSTATEPREFIX__@${PWD}@g" config/localmail.ini
|
|
|
|
$SED -i "s@__LOCALSTATEPREFIX__@${PWD}@g" config/filesgen.ini
|
|
|
|
$SED -i "s@__LOCALSTATEPREFIX__@${PWD}@g" config/happynet.ini
|
|
|
|
$SED -i "s@__BINPREFIX__@${PWD}@g" utils/magiedit/magiedit.sh
|
2018-10-26 03:00:29 +00:00
|
|
|
$SED -i "s@__LOCALSTATEPREFIX__@${PWD}/utils/magiedit@g" utils/magiedit/magiedit.sh
|
2018-10-26 02:13:32 +00:00
|
|
|
$SED -i "s@__EXECPREFIX__@.@g" utils/magiedit/magiedit.sh
|
|
|
|
$SED -i "s@__SHAREPREFIX__@${PWD}@g" scripts/login_stanza.lua
|
2018-01-19 00:37:08 +00:00
|
|
|
$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
|