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