summaryrefslogtreecommitdiff
path: root/jasper_reports/java/po2properties
blob: 3915d199f2b3a655a76ef3a3f9e4ec2d77943fc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

if [ -z "$JAVA_HOME" ]; then
	directories="/usr/lib/jvm/java-6-sun-1.6.0.10/bin /usr/lib/j2sdk1.6-sun /usr/lib/j2sdk1.5-sun"
	for d in $directories; do
		if [ -d "$d" ]; then
			export JAVA_HOME="$d"
		fi
	done
fi

export PATH="$JAVA_HOME"/bin:/bin:/usr/bin
export CLASSPATH=$(ls -1 lib/* | grep jar$ | awk '{printf "%s:", $1}')
export CLASSPATH="$CLASSPATH":$scriptdir

function help()
{
	echo "Syntax: ./po2properties file.po [file.properties]"
	exit
}

if [[ -z "$1" ]]; then
	help
fi

po=$1	

if [[ -z "$2" ]]; then
	properties=$(dirname "$1")/$(basename "$1" .po).properties
else
	properties="$2"
fi

msgmerge -p $po $po > $properties