File: cvsup-tsi-src.sh

package info (click to toggle)
libchewing 0.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,588 kB
  • ctags: 878
  • sloc: sh: 9,738; ansic: 7,644; makefile: 234; python: 49
file content (48 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (3)
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
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

TOP=`pwd`
TABE_TSI=$TOP/data/tabe-tsi.src

if [ ! -f scripts/cvsup-tsi-src.sh ]; then
  echo -e "\033[44;37m You *MUST* run this script in top dir. \033[m"
  exit
fi
if [ -f $TABE_TSI ]; then
  echo -e "\033[44;37m tabe-tsi.src done. \033[m"
  exit
fi

if [ ! -d libtabe ]; then
  echo -e "\033[44;37m No libtabe found. cvs check from libtabe \033[m" 
  cvs -z9 -d :pserver:xcin@xcin.linux.org.tw:/home/service/cvsroot/xcin \
	checkout libtabe
fi

if [ ! -d libtabe ]; then
  echo -e "\033[44;37m There were some problems while checking out. \033[m"
  exit
fi

pushd libtabe
./configure
if [ -f Makefile ]; then
  make clean all

  # patch tsidump to adapt Chewing
  pushd util
  if [ ! -f PATCHED ]; then
    patch -p0 < $TOP/scripts/tsi-chewing.diff
    touch PATCHED
  fi
  make
  
  # generation
  if [ -f tsidump ]; then
    ./tsidump -d ../tsi-src/tsi.db > $TABE_TSI
  fi
  popd
fi
popd

rm -rf libtabe