~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to tools/create_accel_strings.sh

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-08-02 21:32:31 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110802213231-r9v63trgyk1e822j
Tags: 0.9.1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Finding all the module names
 
3
modules=`git grep 'add_library( *[a-zA-Z0-9]\+ *MODULE *[^)]\+' | \
 
4
sed 's/[^:]*:[^a]*add_library( *\([^ ]\+\).*/\1/p' | sort | uniq`
 
5
 
 
6
words=`git grep '\"<Darktable>' $1 | \
 
7
sed 's/[^"]*"\([^"]\+\)"[^"]*/\1/' | tr '/' '\n' | \
 
8
sort | uniq`
 
9
 
 
10
for module in $modules
 
11
do
 
12
  words=`echo "$words" | sed "s/^$module//"`
 
13
done
 
14
 
 
15
echo "$words" | \
 
16
awk '
 
17
BEGIN {
 
18
  print "void accel_strings(){"
 
19
}
 
20
/^[a-zA-Z].*/{
 
21
  if ($0 !~ /create_accel_strings.sh/) print "_(\"" $0 "\");"
 
22
}
 
23
 
 
24
END {
 
25
  print "}"
 
26
}
 
27
  
 
28
'