Rev | Line | |
---|
[131] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | # A helper script for developers. |
---|
| 4 | # ./DIST gen : runs autoconf to generate 'configure' script. |
---|
| 5 | # ./DIST tgz : creates a tarball. |
---|
| 6 | # Assumes gnu tar. |
---|
| 7 | |
---|
| 8 | MODULE=Gauche-mecab |
---|
| 9 | |
---|
| 10 | while [ $# -gt 0 ]; do |
---|
| 11 | case $1 in |
---|
| 12 | gen) gen=yes; shift ;; |
---|
| 13 | tgz) tgz=yes; shift ;; |
---|
| 14 | *) echo "DIST gen|tgz"; exit 0;; |
---|
| 15 | esac |
---|
| 16 | done |
---|
| 17 | |
---|
| 18 | if [ "$gen" = "yes" ]; then |
---|
| 19 | autoconf |
---|
| 20 | fi |
---|
| 21 | |
---|
| 22 | if [ "$tgz" = "yes" ]; then |
---|
| 23 | if [ -f Makefile ]; then make maintainer-clean; fi |
---|
| 24 | ./DIST gen |
---|
| 25 | ./configure |
---|
| 26 | make distclean |
---|
| 27 | |
---|
| 28 | if [ ! -f VERSION ]; then echo "No VERSION; something wrong?"; exit 1; fi |
---|
| 29 | VERSION=`cat VERSION` |
---|
| 30 | |
---|
| 31 | rm -f DIST_EXCLUDE_X |
---|
| 32 | echo DIST > DIST_EXCLUDE_X |
---|
| 33 | echo DIST_EXCLUDE_X >> DIST_EXCLUDE_X |
---|
| 34 | if [ -f DIST_EXCLUDE ]; then cat DIST_EXCLUDE >> DIST_EXCLUDE_X; fi |
---|
| 35 | find . -name CVS -print -prune >> DIST_EXCLUDE_X |
---|
| 36 | |
---|
| 37 | rm -rf ../$MODULE-$VERSION |
---|
| 38 | |
---|
| 39 | mkdir ../$MODULE-$VERSION |
---|
| 40 | tar cvfX - DIST_EXCLUDE_X . | (cd ../$MODULE-$VERSION; tar xf -) |
---|
| 41 | (cd ..; tar cvf - $MODULE-$VERSION | gzip -9 > $MODULE-$VERSION.tgz) |
---|
| 42 | (cd ..; rm -rf $MODULE-$VERSION) |
---|
| 43 | fi |
---|