File:  [Local Repository] / jma-receipt-kk / 30wakayama / orca_print_install.sh
Revision 1.1: download - view: text, annotated - select for diffs
Fri May 21 02:39:30 2010 UTC (9 years, 1 month ago) by yoshi
Branches: MAIN
CVS tags: HEAD
和歌山地方公費PG追加

#!/bin/bash

. /etc/jma-receipt/jma-receipt.env

usrname=`whoami`

# Etchで使用するコードUTF-8への変換
# echo message (default character-code EUC)
function echomsg() {
  if [ "${LANG}" = "ja_JP.UTF-8" ] || [ "${LANG}" = "ja_JP.UTF8" ]; then
    if [ -z $2 ]; then
      echo `echo $1 | nkf -wE`
    else
      echo -n `echo $1 | nkf -wE`
    fi 
  else
    if [ -z $2 ]; then
      echo $1
    else
      echo -n $1
    fi
  fi
  return 0
}

# user check
if [ $usrname != "root" ] ; then
  echomsg "rootユーザで実行してください"
  exit 1
fi

echomsg "和歌山県(総括表・地方公費)プログラムコピー中..."

# file copy
for d in cobol doc data form lddef record scripts ; do
  cp -af ${d} ${SITESRCDIR}
done

# kentan.inc copy
cp ${SYSCONFDIR}/kentan.inc ${SYSCONFDIR}/kentan.inc.bak
sed '/wakayama/d' ${SYSCONFDIR}/kentan.inc.bak > ${SYSCONFDIR}/kentan.inc
rm -rf ${SYSCONFDIR}/kentan.inc.bak
echo -e "\twakayama;" >> ${SYSCONFDIR}/kentan.inc

# site-upgrade.sh run
if [ -f ${SCRIPTSDIR}/allways/site-upgrade.sh ] ; then
	sh ${SCRIPTSDIR}/allways/site-upgrade.sh
else
	echomsg "和歌山県(総括表・地方公費)プログラムコピー異常終了!!"
	exit
fi

sync
echomsg "和歌山県(総括表・地方公費)プログラムコピー終了!!"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>