2 die
() { echo "$1" >&2 ; exit 1 ; }
3 respond
() { echo "$1" >&1 ; exit 0 ; }
6 test "$1" = --version && respond
"$tool (intltool 9.99.9)"
11 test "$1" = -v && respond
"This is not perl 5, version 99, subversion 9 (v5.99.9)"
13 if test -n "$2" && test -z "$3" ; then
14 test "$2" = "require XML::Parser" && exit 0
15 printf "%s" "$2"|
grep '^use 5\.[0-9]*\.[0-9]*;$' >/dev
/null
&& exit 0
17 die
"$0: unsupported usage"
19 test "$2" = "printf '%vd', $^V" && respond
"5.99.9"
20 test "$2" = "require XML::Parser" && exit 0
21 printf "%s" "$2" |
grep '^use [0-9].[0-9].[0-9];$'>/dev
/null
2>&1 && exit 0
22 die
"$0: unsupported usage" ;;
23 *) die
"$0: requested functionality not implemented" ;;
28 while test -n "$1" ; do
30 -x|
-u|
-d) shift ; continue ;;
31 -c) shift ; shift ; continue ;;
37 test -z "$sarg" && die
"$0: need at least 2 args"
38 test -r "$sarg" || die
"$0: no read perms for $sarg"
39 if printf "%s" "$sarg"|
grep "\.xml\.in$" >/dev
/null
2>&1 ; then
40 sed -e 's,<_\([-A-Za-z0-9_]*\)>,<\1>,g' \
41 -e 's,</_\([-A-Za-z0-9_]*\)>,</\1>,g' \
44 sed 's/^_//' < "$sarg" > "$larg"