source: gs2-extensions/tesseract/trunk/makedists.sh@ 34199

Last change on this file since 34199 was 34199, checked in by ak19, 4 years ago

A makedists.sh script for gstika to make the cutdown zip and tarball. Updated the one for tesseract. I'm not sure what the CASCADE-MAKE makedist includes (yet), and it may be different for gnome-lib. But I have so far followed the manual steps for Imagemagick in creating the cutdown binary-only distribution tarballs and carefully controlling what goes in there (which is different for each of these gs extensions).

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/sh
2
3osarch=$1
4usagemsg="Usage: $0 linux-x64|linux"
5if [ -z "$osarch" ]; then
6 echo $usagemsg
7 exit 1;
8fi
9# https://stackoverflow.com/questions/3265803/bash-string-equality
10if [ "$osarch" != "linux-x64" ] && [ "$osarch" != "linux" ]; then
11 echo "Parameter is (slightly?) incorrect."
12 echo $usagemsg
13 exit 1
14fi
15
16gsExt="tesseract"
17echo "Creating $gsExt tarball and zip for $osarch"
18
19if [ ! -d $gsExt ]; then
20 mkdir $gsExt
21
22 cp src/setup.ba* $gsExt/.
23
24 if [ ! -d src/linux ]; then
25 echo "No src/linux folder, can't proceed tarring and zipping up $gsExt."
26 exit 1;
27 else
28 echo "Moving src/linux into $gsExt folder"
29 #mv src/linux $gsExt/.
30 cp -r src/linux $gsExt/.
31
32 echo "Copying licence files"
33 cp src/packages/*LICENSE.txt $gsExt/linux/.
34
35 echo "Copying user info files"
36 cp GETTING-OCR-SUPPORT-FOR-MORE-LANGS.txt $gsExt/.
37
38 echo "Removing $gsExt/linux/man"
39 rm -rf $gsExt/linux/man
40
41 echo "Removing all but folder 'tessdata' from $gsExt/linux/share folder"
42 #rm -rf $gsExt/linux/share/aclocal
43 #rm -rf $gsExt/linux/share/doc
44 #rm -rf $gsExt/linux/share/info/
45 #rm -rf $gsExt/linux/share/libtool/
46 #rm -rf $gsExt/linux/share/man
47 mv $gsExt/linux/share $gsExt/linux/share.del
48 mkdir $gsExt/linux/share
49 mv $gsExt/linux/share.del/tessdata $gsExt/linux/share/.
50 rm -rf $gsExt/linux/share.del
51 fi
52else
53 echo "Folder $gsExt already exists. Using existing."
54 echo "For creating a fresh tarball and zip, delete the existing $gsExt folder"
55 echo "at this script level ($0) first."
56fi
57
58# just try to create it for the OS
59outfile="$gsExt-$osarch"
60if [ -f "$outfile.tar.gz" ]; then
61 rm "$outfile.tar.gz"
62fi
63tar -cvzf "$outfile.tar.gz" $gsExt
64
65if [ -f "$outfile.zip" ]; then
66 rm "$outfile.zip"
67fi
68zip -r "$outfile.zip" $gsExt
69
70#rm -rf $gsExt
71
72echo "Done making $gsExt tarball/zip"
73echo ""
Note: See TracBrowser for help on using the repository browser.