mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 19:19:05 +08:00
06b2156a99
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@685 d0cd1f9f-072b-0410-8dd7-cf729c803f20
44 lines
1.2 KiB
Bash
Executable File
44 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Requirement: tesseract directory name should be "tesseract-3.02"
|
|
|
|
source_dir=${PWD##*/}
|
|
ver=$source_dir
|
|
excld="exclude.txt"
|
|
|
|
cd ..
|
|
echo Output for $source_dir is in `pwd` ...
|
|
|
|
# create language files packages
|
|
if [ -f $excld ]
|
|
then
|
|
echo Removing $excld...
|
|
rm -f $excld
|
|
fi
|
|
|
|
for l in $source_dir/tessdata/*.traineddata
|
|
do
|
|
filename=`basename "$l"`
|
|
lang=${filename%.*}
|
|
echo Creating language package for `basename "$l"`...
|
|
chmod 644 $source_dir/tessdata/*$lang*
|
|
tar --group root --owner root -chozf $ver.`basename "$l" .traineddata`.tar.gz $source_dir/tessdata/*$lang*
|
|
echo $source_dir/tessdata/*$lang* | tr " " "\n" >>$excld
|
|
done
|
|
|
|
# Windows build relevant files
|
|
name=$ver-win_vs
|
|
# Let's be nice and use common windows packager ;-)
|
|
zip -9 -r --exclude=*.svn* $name.zip $source_dir/vs2008/
|
|
|
|
# create linux source package
|
|
echo Creating linux source package $ver.tar.gz ...
|
|
tar -chzf $ver.tar.gz --exclude=.svn --exclude=debian --exclude=doc/html --exclude=po/ --exclude=makemoredists --exclude=vs2008 -X $excld $source_dir/*
|
|
|
|
# create doc and package doc
|
|
cd $source_dir
|
|
doxygen doc/Doxyfile
|
|
cd ..
|
|
tar -chzf $ver-doc-html.tar.gz $source_dir/doc/html/*
|
|
|
|
rm -f $excld
|
|
cd $source_dir |