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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#!/bin/sh
# tc-inst --- install data files used by tcode driver on Emacs.
# Copyright (C) 1998, 1999 KITAJIMA Akira.
# Author: KITAJIMA Akira <kitajima@ics.es.osaka-u.ac.jp>
# Create: 28th December, 1998
# $Id: tc-inst.in,v 1.2 1999/02/27 12:42:02 kitajima Exp $
### Code:
prefix=@prefix@
datadir=@datadir@
echo This is an install-script for data files used by tcode driver on Emacs.
if [ $# = 0 ]; then
echo usage: $0 tcode-data-directory
exit 1
fi
tcdatadir=$1
if [ ! -d $tcdatadir ]; then
echo -n "Directory $tcdatadir does not exist. "
echo -n "Create (y/n) [y]? "
read yn
if [ x"$yn" = xn ]; then
exit 1
fi
mkdir -p $tcdatadir
fi
install_file () {
if [ -f "$tcdatadir/$1" ]; then
echo "File $tcdatadir/$1 already exists."
echo -n "Overwrite (y/n) [n]? "
read yn
if [ x"$yn" = xy ]; then
echo 'Skipped.'
else
cp -p $datadir/$1 $tcdatadir
fi
else
cp -p $datadir/$1 $tcdatadir
fi
}
install_file mazegaki.dic
install_file bushu.dic
if [ -f $HOME/.tc ]; then
echo -n "File ~/.tc already exists. "
echo -n "Overwrite (y/n) [n]? "
read yn
if [ x"$yn" != xy ]; then
echo "You may add (setq tcode-data-directory \"$tcdatadir/\")"
echo "in your .tc"
exit 0
fi
cp -p $HOME/.tc $HOME/.tc.bak
fi
echo ";;; -*-emacs-lisp-*- This file is automatically created" > $HOME/.tc
echo "(setq tcode-data-directory \"$tcdatadir/\")" >> $HOME/.tc
echo "(setq eelll-text \"$datadir/EELLLTXT\")" >> $HOME/.tc
echo
echo "You have to append the following line to your .emacs."
echo "(require 'tc-setup)"
echo -n "Append now (y/n) [n]? "
read yn
if [ x"$yn" = xy ]; then
echo "(require 'tc-setup)" >> $HOME/.tc
fi
exit 0
|