forked from github/server
minor, obvious fixes
This commit is contained in:
parent
10eb4f9ac9
commit
2f35feee3e
|
@ -1,5 +1,5 @@
|
||||||
[game]
|
[game]
|
||||||
email = eressea-server@kn-bremen.de
|
email = eressea-server@example.com
|
||||||
sender = Eressea Server
|
sender = Eressea Server
|
||||||
name = Eressea
|
name = Eressea
|
||||||
report = reports
|
report = reports
|
||||||
|
|
|
@ -16,7 +16,7 @@ then
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "-Lde" ]
|
if [ "$1" == "-Len" ]
|
||||||
then
|
then
|
||||||
TEMPLATE=report-mail.en.txt
|
TEMPLATE=report-mail.en.txt
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## this script takes a backup of a turn.
|
|
||||||
## usage: backup.sh <turn>
|
|
||||||
|
|
||||||
if [ -z $ERESSEA ]; then
|
if [ -z $ERESSEA ]; then
|
||||||
echo "You have to define the \$ERESSEA environment variable to run $0"
|
echo "You have to define the \$ERESSEA environment variable to run $0"
|
||||||
|
|
|
@ -10,7 +10,7 @@ done
|
||||||
if [ "$FORCE" != "yes" ] ; then
|
if [ "$FORCE" != "yes" ] ; then
|
||||||
BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//')
|
BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//')
|
||||||
if [ "$BRANCH" != "master" ] ; then
|
if [ "$BRANCH" != "master" ] ; then
|
||||||
echo "you should only install stable versions from the master branch"
|
echo "You should only install stable versions from the master branch. Use -f to override."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
50
s/setup
50
s/setup
|
@ -11,9 +11,9 @@ done
|
||||||
ERESSEA=$(dirname $ROOT)
|
ERESSEA=$(dirname $ROOT)
|
||||||
|
|
||||||
function abort() {
|
function abort() {
|
||||||
echo $1
|
echo $1
|
||||||
[ -z $2 ] && exit -1
|
[ -z $2 ] && exit -1
|
||||||
exit $2 # otherwise
|
exit $2 # otherwise
|
||||||
}
|
}
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
|
@ -63,34 +63,36 @@ if [ -d $dir ] ; then
|
||||||
[ $force -eq 1 ] || abort "$dir directory exists. Use -f to force"
|
[ $force -eq 1 ] || abort "$dir directory exists. Use -f to force"
|
||||||
fi
|
fi
|
||||||
mkdir -p $dir
|
mkdir -p $dir
|
||||||
cd $dir || abort "could not chdir to game-$game"
|
cd $dir || abort "could not chdir to $dir"
|
||||||
mkdir -p data reports
|
mkdir -p data reports
|
||||||
|
|
||||||
function ini_sec() {
|
function ini_sec() {
|
||||||
if [ $edit -eq 1 ]; then
|
if [ $edit -eq 1 ]; then
|
||||||
$INIFILE eressea.ini add $1
|
$INIFILE eressea.ini add $1
|
||||||
else
|
else
|
||||||
echo "[$1]" >> eressea.ini
|
echo "[$1]" >> eressea.ini
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function ini_add() {
|
function ini_add() {
|
||||||
if [ $edit -eq 1 ]; then
|
if [ $edit -eq 1 ]; then
|
||||||
$INIFILE eressea.ini add $1:$2 $3
|
$INIFILE eressea.ini add $1:$2 $3
|
||||||
else
|
else
|
||||||
echo "$2 = $3" >> eressea.ini
|
echo "$2 = $3" >> eressea.ini
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function ini_start() {
|
function ini_start() {
|
||||||
if [ -e eressea.ini ]; then
|
if [ -e eressea.ini ]; then
|
||||||
if [ ! -e $INIFILE ] && [ $edit -eq 1 ]; then
|
if [ ! -e $INIFILE ] && [ $edit -eq 1 ]; then
|
||||||
abort "missing editor for eressea.ini. use -n to create new file."
|
abort "missing editor for eressea.ini. use -n to create new file."
|
||||||
fi
|
fi
|
||||||
rm -f eressea.ini
|
rm -f eressea.ini
|
||||||
edit=0
|
edit=0
|
||||||
else
|
else
|
||||||
edit=0
|
edit=0
|
||||||
fi
|
fi
|
||||||
touch eressea.ini
|
touch eressea.ini
|
||||||
}
|
}
|
||||||
|
|
||||||
ini_start
|
ini_start
|
||||||
|
|
|
@ -29,7 +29,7 @@ local function dbupdate()
|
||||||
update_scores()
|
update_scores()
|
||||||
if config.dbname then
|
if config.dbname then
|
||||||
dbname = config.basepath..'/'..config.dbname
|
dbname = config.basepath..'/'..config.dbname
|
||||||
edb = db.open(dbame)
|
edb = db.open(dbname)
|
||||||
if edb~=nil then
|
if edb~=nil then
|
||||||
edb:update_factions()
|
edb:update_factions()
|
||||||
edb:update_scores()
|
edb:update_scores()
|
||||||
|
|
|
@ -859,7 +859,7 @@ static void select_regions(state * st, int selectmode)
|
||||||
static void loaddata(state *st) {
|
static void loaddata(state *st) {
|
||||||
char datafile[MAX_PATH];
|
char datafile[MAX_PATH];
|
||||||
|
|
||||||
askstring(st->wnd_status->handle, "save as:", datafile, sizeof(datafile));
|
askstring(st->wnd_status->handle, "load from:", datafile, sizeof(datafile));
|
||||||
if (strlen(datafile) > 0) {
|
if (strlen(datafile) > 0) {
|
||||||
readgame(datafile);
|
readgame(datafile);
|
||||||
st->modified = 0;
|
st->modified = 0;
|
||||||
|
|
Loading…
Reference in New Issue