summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2006-08-07 21:40:21 +0000
committerFrans Pop <elendil@planet.nl>2006-08-07 21:40:21 +0000
commit47e9cdc1b9a82bee3aa22b28d9dda1ee98fea15a (patch)
treef3277c64fd1c18ff253bbe1e766810c32fbb20a7 /scripts
parent007e35f8a64f92bd343c7df9e6f701d9e428fa29 (diff)
downloadinstallation-guide-47e9cdc1b9a82bee3aa22b28d9dda1ee98fea15a.zip
Take previous version from file itself rather than from svn log
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/unfuzzy-xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/unfuzzy-xml b/scripts/unfuzzy-xml
index bd324d26a..cd39cb1c2 100755
--- a/scripts/unfuzzy-xml
+++ b/scripts/unfuzzy-xml
@@ -7,7 +7,7 @@
# English text and then only if they know exactly what they are doing!
# The script takes a revision number as argument, looks for English files
-# modified in that commit and finds the previous revision from the log.
+# modified in that commit and finds the previous revision of the file.
# It then changes the revision comment for any translation that was
# up-to-date with the previous revision.
@@ -25,8 +25,8 @@ MODIFIED="$(find . -name "*.xml" | xargs grep "^<.*\$Id:.*$REV" | cut -d: -f1)"
cd ..
for XML in $MODIFIED; do
- PREVREV="$(svn log en/$XML | egrep "^r[0-9]{5} \| .* \| [0-9]* lines?" | \
- head -n 2 | tail -n 1 | sed "s/^r\([0-9]*\).*$/\1/")"
+ PREVREV="$(svn cat -r $(($REV - 1)) en/$XML | grep "^<.*\$Id:" | \
+ sed "s/^.*\.xml \([0-9]*\) .*/\1/")"
echo "$XML: $PREVREV -> $REV"
if [ "$PREVREV" ] && [ "$PREVREV" -lt "$REV" ]; then
sed -i "s/^\(.*original version: \)$PREVREV\(.*\)$/\1$REV\2/" */$XML