This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
magicka/setup.sh

84 lines
1.8 KiB
Bash
Raw Normal View History

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
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
2018-01-19 00:37:08 +00:00
PLATFORM=`uname`
if [[ "$PLATFORM" == 'FreeBSD' ]] || [[ "$PLATFORM" == 'Darwin' ]]; then
SED = gsed
else
SED = sed
fi
$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