#! /bin/sh
( . /sw/bin/init.sh
  cd $HOME/projects/kanbun/mecab-kanbun
  git pull .
  D=incoming/$USER/hakubun
  mkdir -p $D
  for F
  do B=`basename $F`
     if [ ! -s $D/$B ]
     then cp `ls -1t incoming/*/[th]*/$B | head -1` $D/$B
     fi
     /usr/local/bin/xemacs $D/$B
     git add .
     git commit -am $D/$B
  done
  git push origin master
) > $HOME/hakubun.log
exit 0
