summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-04-10 20:19:32 +0000
committerKarl Berry <karl@freefriends.org>2006-04-10 20:19:32 +0000
commitc104f7d73fd01df27f5a9a83cbaaf22e882fbb33 (patch)
tree038920e25041b557b6e4d3b678db2e4549b0c10d /Build
parentaf9182e0effdc1d23a64fd487b3877cf3233f5ec (diff)
more protection against running from anywhere, etc.
git-svn-id: svn://tug.org/texlive/trunk@1558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/tools/svnchangelog14
1 files changed, 11 insertions, 3 deletions
diff --git a/Build/tools/svnchangelog b/Build/tools/svnchangelog
index e655c4d5868..f74a33281ee 100755
--- a/Build/tools/svnchangelog
+++ b/Build/tools/svnchangelog
@@ -24,17 +24,25 @@ echo "$lastlogged" | egrep '^[0-9]+$' >/dev/null \
nextneeded=`expr $lastlogged + 1`
$debug && echo "lastlogged=$lastlogged, nextneeded=$nextneeded"
+if test -z "$nextneeded"; then
+ echo "$0: empty nextneeded?!"
+ exit 1
+fi
# get the log info since then.
-tlroot=`cd ../.. && pwd`
+tlroot=`cd $mydir/../.. && pwd`
newlogs=$outdir/newlogdata
-svn log -v -r HEAD:$nextneeded $tlroot >$newlogs
+svn log -v -r HEAD:$nextneeded $tlroot >$newlogs || exit 1
# with HEAD:next we get the entries newest first, as we want them.
$debug && ls -l $newlogs
line=`grep '^r[0-9]* |' $newlogs | head -1 | sed 's/^r//'`
latestchange=`echo "$line" | awk '{print $1}'`
$debug && echo "latestchange=$latestchange"
+if test -z "$latestchange"; then
+ echo "$0: empty latestchange?!"
+ exit 1
+fi
# done if nothing submitted since last change.
# or if only one commit has been made, because we ourselves do a commit,
@@ -60,7 +68,7 @@ fi
# prepend new changes to current log.
cat $newlogs $outfile >$outfile.new
-if false; then # really debug
+if $debug; then # really debug
# show first and last change number in each file.
for f in $newlogs $outfile $outfile.new; do
echo