forked from jlewin/tesseract-ocr-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakemoredists
executable file
·38 lines (32 loc) · 1.32 KB
/
makemoredists
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
35
36
37
38
#!/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 -chzf tesseract-ocr-$version.tar.gz --exclude=.svn --exclude=vs2008 --exclude=vs2010 -X $excld tesseract-ocr/*
rm -f $excld
# Windows build relevant files
name=$ver-win_vs
# 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/port/* tesseract-ocr/vs2008/lib/* tesseract-ocr/vs2010/* tesseract-ocr/vs2010/include/* tesseract-ocr/vs2010/include/leptonica/* tesseract-ocr/vs2010/port/*
# create doc
doxygen tesseract-ocr/doc/Doxyfile
tar -chzf $ver-doc-html.tar.gz tesseract-ocr/doc/html/*