2016-12-11 15:58:42 -05:00
|
|
|
#!/bin/bash
|
2016-12-11 15:56:22 -05:00
|
|
|
|
|
|
|
# find jar-file with highest version number
|
2016-12-11 15:58:42 -05:00
|
|
|
for i in `ls build/dist/poi-*.jar | grep -v -- "-sources" | grep -v -- "-examples" | grep -v -- "-excelant" | grep -v -- "-ooxml" | grep -v -- "-javadoc"`;do
|
2016-12-11 15:57:24 -05:00
|
|
|
CP=$i:$CP
|
2016-12-11 15:56:22 -05:00
|
|
|
done
|
2016-12-11 15:57:12 -05:00
|
|
|
|
|
|
|
if [ "$CP" = "" ]
|
|
|
|
then
|
|
|
|
echo Did not find jar files in directory build/dist, please run target "jar"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-12-11 15:56:22 -05:00
|
|
|
echo Using jar $CP
|
|
|
|
|
2016-12-11 15:58:42 -05:00
|
|
|
file=$1
|
|
|
|
echo Found extension ${file: -4}
|
|
|
|
if [ ${file: -4} == ".doc" ]
|
|
|
|
then
|
|
|
|
java -cp $CP org.apache.poi.hwpf.dev.HWPFLister "$@" --pictures --escher
|
|
|
|
else
|
|
|
|
java -cp $CP org.apache.poi.hssf.dev.BiffViewer --escher "$@"
|
|
|
|
fi
|