Author: soliton
Date: Sun May 24 00:25:00 2009
New Revision: 35852

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35852&view=rev
Log:
added a script to create some convenient symlinks

Added:
    trunk/utils/mp-server/create_symlinks   (with props)

Added: trunk/utils/mp-server/create_symlinks
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/mp-server/create_symlinks?rev=35852&view=auto
==============================================================================
--- trunk/utils/mp-server/create_symlinks (added)
+++ trunk/utils/mp-server/create_symlinks Sun May 24 00:25:00 2009
@@ -1,0 +1,31 @@
+#!/bin/sh
+die() { echo >&2 "$@"; exit 1; }
+[ $# -eq 1 ] || die "Syntax: $0 <stable version>"
+set -o errexit
+set -o nounset
+
+STABLE=$1
+MAJOR_V=${STABLE%%.*}
+MINOR_V=${STABLE#*.}
+[ $(($MINOR_V % 2)) -eq 0 ] || die "An odd stable version.. are you sure?"
+
+OLDSTABLE=$MAJOR_V.$(($MINOR_V-2))
+DEV=$MAJOR_V.$(($MINOR_V+1))
+PREV=$DEV-prev
+
+cd "$HOME/servers"
+ln -sf $OLDSTABLE oldstable
+ln -sf $STABLE stable
+ln -sf $DEV dev
+ln -sf $PREV prev
+
+cd "$HOME"
+ln -sf servers/oldstable/current.log  oldstable.log
+ln -sf servers/stable/current.log     stable.log
+ln -sf servers/dev/current.log        dev.log
+ln -sf servers/prev/current.log       prev.log
+ln -sf servers/$OLDSTABLE/current.log $OLDSTABLE.log
+ln -sf servers/$STABLE/current.log    $STABLE.log
+ln -sf servers/$DEV/current.log       $DEV.log
+ln -sf servers/$PREV/current.log      $PREV.log
+

Propchange: trunk/utils/mp-server/create_symlinks
------------------------------------------------------------------------------
    svn:executable = *


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to