nptl: Replace sbrk with mmap
[uclibc-ng.git] / utils / xgettext
blob4dbd2fa3dea91f68c70b55700ab9caf805b764ae
1 #!/bin/sh
2 outputfile=
3 outputdir=
4 domain=messages
6 spliteq() {
7 arg=$1
8 echo "${arg#*=}"
9 #alternatives echo "$arg" | cut -d= -f2-
10 # or echo "$arg" | sed 's/[^=]*=//'
13 syntax() {
14 printf "%s\n" "Usage: xgettext [OPTION] [INPUTFILE]..."
15 exit 1
18 show_version() {
19 printf "%s\n", "these are not (GNU gettext-tools) 99.9999.9999\n"
20 exit 0
23 while true ; do
24 case $1 in
25 #--files-from=*) readfile `spliteq "$1"`;;
26 #-f) expectfilefrom=1;;
27 --version) show_version;;
28 -V) show_version;;
29 --default-domain=*) domain=`spliteq "$1"` ;;
30 -d) shift ; domain="$1" ;;
31 --files-from=*) : ;;
32 -f) shift ;;
33 --directory=*) : ;;
34 -D) shift ;;
35 -o) shift ; outputfile="$1" ;;
36 --output=*) outputfile=`spliteq "$1"` ;;
37 --output-dir=*) outputdir=`spliteq "$1"` ;;
38 -p) shift ; outputdir=`spliteq "$1"` ;;
39 --language=*) : ;;
40 -L) shift ;;
41 --C) : ;;
42 --c++) : ;;
43 --from-code=*) : ;;
44 --join-existing) : ;;
45 -j) : ;;
46 --exclude-file=*) : ;;
47 -x) shift;;
48 --add-comments=*) : ;;
49 -cTAG) shift;;
50 --add-comments) : ;;
51 -c) : ;;
52 --extract-all) : ;;
53 -a) : ;;
54 --keyword=*) : ;;
55 -k*) : ;;
56 --keyword) : ;;
57 -k) : ;;
58 --flag=*) : ;;
59 --trigraphs) : ;;
60 -T) : ;;
61 --qt) : ;;
62 --kde) : ;;
63 --boost) : ;;
64 --debug) : ;;
65 --color) : ;;
66 --color=*) : ;;
67 --style=*) : ;;
68 --no-escape) : ;;
69 -e) : ;;
70 --escape) : ;;
71 -E) : ;;
72 --force-po) force=1 ;;
73 --indent) : ;;
74 -i) : ;;
75 --no-location) : ;;
76 --add-location) : ;;
77 -n) : ;;
78 --strict) : ;;
79 --properties-output) : ;;
80 --stringtable-output) : ;;
81 --width=*) : ;;
82 -w) : ;;
83 --no-wrap) : ;;
84 --sort-output) : ;;
85 -s) : ;;
86 --sort-by-file) : ;;
87 -F) : ;;
88 --omit-header) : ;;
89 --copyright-holder=*) : ;;
90 --foreign-user) : ;;
91 --package-name=*) : ;;
92 --package-version=*) : ;;
93 --msgid-bugs-address=*) : ;;
94 --msgstr-prefix*) : ;;
95 -m*) : ;;
96 --msgstr-suffix*) : ;;
97 -M*) : ;;
98 --help) syntax ;;
99 -h) syntax ;;
100 *) break ;;
101 esac
102 shift
103 done
105 [ "$outputfile" = "-" ] && exit 0
106 [ -z "$outputdir" ] && outputdir=.
107 [ -z "$outputfile" ] && outputfile=${domain}.po
108 touch $outputdir/$outputfile