mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:39:35 +08:00
d8a2303daf
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@546 d0cd1f9f-072b-0410-8dd7-cf729c803f20
36 lines
1.1 KiB
Bash
Executable File
36 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Requirement: tesseract directory name must be "tesseract-ocr" otherwise
|
|
# script will not work
|
|
|
|
# get version information
|
|
version=`grep PACKAGE_VERSION= configure | sed -e "s/PACKAGE_VERSION=//" | sed -e "s/'//g"`
|
|
ver=tesseract-ocr-$version
|
|
excld="exclude.txt"
|
|
cd ..
|
|
echo Output for $ver is in `pwd`...
|
|
|
|
# create language files packages
|
|
if [ -f $excld ]
|
|
then
|
|
echo Removing $excld...
|
|
rm -f $excld
|
|
fi
|
|
|
|
for l in tesseract-ocr/tessdata/*.traineddata
|
|
do
|
|
echo Creating language package for `basename "$l" .traineddata`...
|
|
chmod 644 ${l%%.*}.*
|
|
tar --group root --owner root -chozf $ver.`basename "$l" .traineddata`.tar.gz ${l%%.*}.*
|
|
echo ${l%%.*}.* | tr " " "\n" >>$excld
|
|
done
|
|
|
|
# create linux source package
|
|
tar -chozf tesseract-ocr-3.01.tar.gz --exclude=.svn --exclude=vs2008 -X $excld tesseract-ocr/*
|
|
rm -f $excld
|
|
|
|
# Windows build relevant files
|
|
name=$ver-vs2008
|
|
# Let's be nice and use common windows packager ;-)
|
|
zip $name.zip tesseract-ocr/vs2008/* tesseract-ocr/vs2008/include/* tesseract-ocr/vs2008/include/leptonica/* tesseract-ocr/vs2008/lib/* tesseract-ocr/vs2008/port/*
|
|
|