mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 10:54:15 +00:00
made use of the readlink command
This commit is contained in:
parent
4342bfebf6
commit
6eedb15c65
@ -8,7 +8,7 @@ echo=""
|
||||
[ "$1" = "-n" ] && { echo=echo; shift; }
|
||||
[ $1 -ge 1 ] || die "New version must be greater than 1!"
|
||||
|
||||
DEV_VERSION=1.5
|
||||
DEV_VERSION=$(readlink $HOME/servers/dev)
|
||||
NEW_VERSION=$DEV_VERSION.$1
|
||||
PREV_VERSION=$DEV_VERSION.$(($1-1))
|
||||
PPREV_VERSION=$DEV_VERSION.$(($1-2))
|
||||
|
@ -66,8 +66,8 @@ do
|
||||
[ -x bin/wesnothd-$SERVER ] || die "Executable 'bin/wesnothd-$SERVER' not found."
|
||||
|
||||
DATE=$(date +"%Y%m%d-%H%M%S")
|
||||
[ ! -f "$SERVERBASE"/redirect.cfg ] || PORT=$(sed -nre '/port=/s/[ \t]*port="?([0-9]+)"?/\1/p' "$SERVERBASE"/redirect.cfg)
|
||||
BUILDDIR=$(ls -ld "$SERVERBASE"/build | sed -nre 's,.*(\.\./builds/wesnothd-[^ ]+/),\1,p')
|
||||
[ -r "$SERVERBASE"/redirect.cfg ] && PORT=$(sed -nre '/port=/s/[ \t]*port="?([0-9]+)"?/\1/p' "$SERVERBASE"/redirect.cfg)
|
||||
BUILDDIR=$(readlink "$SERVERBASE"/build)
|
||||
REV=r$(echo $BUILDDIR | sed -nre "s,.*wesnothd-svn-([0-9:SM]+)_$SERVER/$,\1,p")
|
||||
LOG="wesnothd.$DATE.$REV.log"
|
||||
bin/wesnothd-$SERVER -c "$SERVERBASE"/wesnothd.cfg --port $PORT --threads $THREADS $PARAMETERS > "$SERVERBASE/logs/$LOG" 2>&1 &
|
||||
|
Loading…
x
Reference in New Issue
Block a user