poi/view.sh
Dominik Stadler 5e476cd95e Enhance view.sh for HWPF/doc files
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773642 13f79535-47bb-0310-9956-ffa450edef68
2016-12-11 20:58:42 +00:00

24 lines
585 B
Bash
Executable File

#!/bin/bash
# find jar-file with highest version number
for i in `ls build/dist/poi-*.jar | grep -v -- "-sources" | grep -v -- "-examples" | grep -v -- "-excelant" | grep -v -- "-ooxml" | grep -v -- "-javadoc"`;do
CP=$i:$CP
done
if [ "$CP" = "" ]
then
echo Did not find jar files in directory build/dist, please run target "jar"
exit 1
fi
echo Using jar $CP
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