/[d-i]/trunk/manual/scripts/cp-untrans
ViewVC logotype

Contents of /trunk/manual/scripts/cp-untrans

Parent Directory Parent Directory | Revision Log Revision Log


Revision 53424 - (show annotations) (download)
Mon May 19 02:09:22 2008 UTC (5 years, 1 month ago) by guillem
File size: 1029 byte(s)
cp-untrans: Use cat instead of echo for --help

The latter does not work with HERE docs on dash.
1 #!/bin/sh
2
3 # If doc-check shows outdated untranslated files, this script can
4 # be used to copy the new English versions of these updated files
5 # to your translation. The script will also run rev-update for you.
6
7 # Note:
8 # Run doc-check before you run this script.
9 # It is recommended you use 'svn diff <language>' to check the
10 # changes made by this script before committing.
11
12 set -e
13
14 language=${1:-pl}
15
16 if [ "$1" = "--help" ]; then
17 cat <<HELP
18 Usage: $0 [<language>]
19
20 --help print this help message.
21
22 Current <language> is '$language'.
23 HELP
24 exit 0
25 fi
26
27 UFILES="$(./scripts/doc-check $language 2>/dev/null | \
28 egrep "^en\/.* \(untranslated\)$" | \
29 cut -d" " -f1 | cut -d"/" -f2- )"
30
31 if [ -z "$UFILES" ] ; then
32 echo "No updated untranslated files for language '$language' found."
33 exit 0
34 fi
35
36 for UFILE in $UFILES; do
37 echo "Copying $UFILE from ./en to ./$language"
38 cp ./en/$UFILE ./$language/$UFILE
39 done
40
41 echo ""
42 echo "Running rev-update..."
43 ./scripts/rev-update $language
44
45 exit 0

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5