svnup.sh
author bjarni
Mon, 07 Nov 2005 23:20:47 +0000
changeset 2617 a9e1a187de99
parent 1583 3e1dc56326ae
permissions -rwxr-xr-x
(svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too long trains
-Trains will now remember the length of stations it visits and sell cars
when being autoreplaced if they became too long
-If it needs to remove cars, then it starts from the front and sells
all it can find until the train is short enough
-This only works for trains, that knows the station length of the route
so a full uninterrupted run is needed
-a train needs 1-2 runs to detect if the shortest station is expanded
-This feature can be turned on and off in the train replace window
and each company can have it's own setting
-NOTE: minor savegame version bump
335
f3298fda6c37 (svn r504) The Bourne Shell ist spelled 'sh', not 'bash'; even if there is a 'bash', on most systems it's not in /bin
tron
parents: 113
diff changeset
     1
#!/bin/sh
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     2
# This script updates the svn source and displays log changes
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     3
# This is only useful for users of CLI based SVN clients
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     4
# Written by Bjarni
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
1488
cf51e91f3b98 (svn r1992) Show the ./svnup.sh output in $PAGER (less if unset).
pasky
parents: 335
diff changeset
     6
[ "$PAGER" ] || PAGER=less
cf51e91f3b98 (svn r1992) Show the ./svnup.sh output in $PAGER (less if unset).
pasky
parents: 335
diff changeset
     7
cf51e91f3b98 (svn r1992) Show the ./svnup.sh output in $PAGER (less if unset).
pasky
parents: 335
diff changeset
     8
cf51e91f3b98 (svn r1992) Show the ./svnup.sh output in $PAGER (less if unset).
pasky
parents: 335
diff changeset
     9
(
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    10
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    11
# reads what version you have now
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    12
Base=`svn info | grep "Revision" | xargs -n 1 | tail -n 1`
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    13
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    14
# updates the source
113
cc110ea79126 (svn r114) updated svnup.sh to display merged files (blathijs)
bjarni
parents: 0
diff changeset
    15
svn update > svn.log
cc110ea79126 (svn r114) updated svnup.sh to display merged files (blathijs)
bjarni
parents: 0
diff changeset
    16
cat svn.log
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    17
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    18
# if the revision number changed
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    19
if [ "$Base" -ne "`svn info | grep "Revision" | xargs -n 1 | tail -n 1`" ]; then
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    20
# displays the log changes
1583
3e1dc56326ae (svn r2087) Show also the modified filenames along each change in svn log. Prevents enraging Darkvater, and we show the commit messages along changed files everywhere else too (on IRC and in mail).
pasky
parents: 1488
diff changeset
    21
svn log -v -r HEAD:$(($Base + 1))
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    22
fi
113
cc110ea79126 (svn r114) updated svnup.sh to display merged files (blathijs)
bjarni
parents: 0
diff changeset
    23
cc110ea79126 (svn r114) updated svnup.sh to display merged files (blathijs)
bjarni
parents: 0
diff changeset
    24
# displays merged files
cc110ea79126 (svn r114) updated svnup.sh to display merged files (blathijs)
bjarni
parents: 0
diff changeset
    25
cat svn.log|grep "^G"
335
f3298fda6c37 (svn r504) The Bourne Shell ist spelled 'sh', not 'bash'; even if there is a 'bash', on most systems it's not in /bin
tron
parents: 113
diff changeset
    26
cat svn.log|grep "^C"
1488
cf51e91f3b98 (svn r1992) Show the ./svnup.sh output in $PAGER (less if unset).
pasky
parents: 335
diff changeset
    27
cf51e91f3b98 (svn r1992) Show the ./svnup.sh output in $PAGER (less if unset).
pasky
parents: 335
diff changeset
    28
) | $PAGER