File: gcin-user-setup

package info (click to toggle)
gcin 1.4.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,488 kB
  • ctags: 3,272
  • sloc: ansic: 25,634; makefile: 524; sh: 411; cpp: 231
file content (47 lines) | stat: -rwxr-xr-x 763 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

if [ -z "$1" -o -z "$2" ]; then
  echo "please specify gcin_table_dir gcin_bin_dir"
fi

cd

if [ ! -d .gcin ]; then
  mkdir .gcin
fi

if [ ! -d .gcin/config ]; then
  mkdir .gcin/config
fi

cd ~/.gcin

if [ -f tsin -a ! -f tsin32 ]; then
  echo "covert to new tsin32"
  $2/tsd2a tsin > tmpfile
  $2/tsa2d32 tmpfile
fi

diff1=''
diff tsin-1.src $1/tsin-1.src >& /dev/null
if [ $? != 0 ]; then
diff1='Y'
fi


if [ ! -f tsin-1.src -o -n "$diff1" ]; then
  echo "merge tsin-1.src"
  cp $1/tsin-1.src .
  $2/tsd2a32 tsin32 > tmpfile
  cat tsin-1.src >> tmpfile
  $2/tsa2d32 tmpfile
fi

cd $1 || echo "$1 is not a gcin table dir"

for i in pho.tab pho-huge.tab tsin* symbol-table phrase.table
do
  if [ ! -f ~/.gcin/$i ]; then
     cp $i ~/.gcin
  fi
done