#!/bin/bash

cd ~/.gcin
f=$1.append.gtab.tsin-db
echo $f
if [ ! -f $f ]; then
  f=$1.tsin-db
  echo $f
  if [ ! -f $f ]; then
    echo "No $1.*.gtab.tsin-db exist"
    exit 0
  fi
fi

fsrc=$f.src

$GCIN_BIN_DIR/tsd2a32 $f > $fsrc
$UTF8_EDIT $fsrc
$GCIN_BIN_DIR/tsa2d32 $fsrc $f
