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 79 80 81 82 83 84 85 86 87 88
|
#! /bin/sh
#############################################################################
# version and archive name configuration
version=`sed -e "s,^[^0-9]*\([0-9][0-9]*\)[^0-9]*\([0-9][0-9.]*\).*$,\1.\2," -e t -e d VERSION`
majorversion=`sed -e "s,^[^0-9]*\([0-9][0-9]*\)[^0-9]*\([0-9][0-9]*\).*$,\1.\2," -e t -e d VERSION`
good=[43m
error=[41m
normal=[0m
echo "$good version $version $normal"
case "$1" in
-) archive=mined-$version-beta;;
*) archive=mined-$version;;
esac
if [ "$1" = "" ]
then
majorrelease=`sed -e 's,\..*,,' VERSION`
if ! egrep "$majorrelease" src/help/introduction > /dev/null
then
echo "$error wrong VERSION information in help section 'introduction' $normal" >&2
exit -1
fi
release=`sed -e "s,.*release,release," -e "s,\..*,," VERSION`
if ! egrep "$release" doc/header.html > /dev/null
then
echo "$error wrong VERSION information in doc/header.html $normal" >&2
exit -1
fi
fi
#############################################################################
# file name configuration
src="src/*.h src/*.c"
srcbuild="src/mnemos.??* src/*.cfg src/*.map src/charmaps/*.map src/keymaps0/*.h"
srcdoc="src/*.doc"
srcconf="configure src/*config* src/*.prj"
srcmake="src/make* src/mk* src/categors.sed src/vni.* src/insutf8 src/handescr/m* src/handescr/*.se? src/keymaps0/punctuation* src/vms-link.com"
man="man/*html*man* man/*.sed man/*.1 man/makefile src/help/[^@]*"
doc="$man doc/*.html doc/*.gif doc/*.png doc/compilation"
stuff="README* LICENSE.GNU CHANGES INSTALL* VERSION usrshare/*"
package="*.sed DESCR debian"
make="make*"
extra="src/merk*"
# assemble file list, without extra stuff
# include bin for recursive inclusion
files="$src $srcbuild $srcdoc $srcconf $srcmake $doc $stuff $package $make"
#bin="bin"
bin=
#############################################################################
# include extra files but exclude bin if parameter "+" included
if [ "$1" = "+" ]
then files="$files $extra"
shift
else files="$files $bin"
fi
#############################################################################
# prefix $archive to all file names
ff=
for f in $files
do ff="$ff $archive/$f"
done
files="$ff"
#############################################################################
# make the archive
ln -s . $archive
/bin/tar clf release/$archive.tar $files
rm -f release/$archive.tar.gz
gzip release/$archive.tar
/bin/rm $archive
#############################################################################
|