diff --git a/make-dist b/make-dist new file mode 100755 index 000000000..5cbdf0182 --- /dev/null +++ b/make-dist @@ -0,0 +1,15 @@ +#!/bin/sh -e + +# The directory in which to find the last snapshot +dir=${HOME}/gnu/releases + +# The name of this module +module=gstep-base + +. Version + +cvs -Q rtag -F release-`echo ${VERSION} | tr . -` $module + +make dist + +mv -f ${module}-${VERSION}.tar.gz $dir diff --git a/make-dist-diff b/make-dist-diff new file mode 100755 index 000000000..0140d0762 --- /dev/null +++ b/make-dist-diff @@ -0,0 +1,58 @@ +#!/bin/sh + +# The directory in which to find the last snapshot; must be absolute path +dir=/home/mccallum/gnu/releases + +# The email addresses of people to receive mail about the new diff +diff_recipients=gnustep-dev@prep.ai.mit.edu + +# The name of this module +module=gstep-base +# A regular expression for the version string "x.y.z" +yrptn='[0-9][0-9][0-9][0-9][0-9][0-9]' +# The pattern for the file containing the diff +ptn="${module}-${yrptn}" +dptn="${ptn}-${yrptn}.diff" + +# Get the current version +. Version + +# Find date of the last snapshot +lastdist=${VERSION} + +# This depends on the user setting this variable from the command line +if [ -z $OLD ]; then + echo You must set the shell variable OLD to the old version number. + exit -1 +fi +secondlastdist=${OLD} + +echo Making diff between $secondlastdist and $lastdist + +# The name of the diff file +diff="${module}-${secondlastdist}-${lastdist}.diff" + +if [ -f $dir/$diff ]; then + echo $dir/$diff already exists! Exiting. + exit -1 +fi +echo Making $diff + +# Untar the old dist +(cd /tmp ; tar -zvxf $dir/${module}-${secondlastdist}.tar.gz) +# Untar the new dist +(cd /tmp ; tar -zvxf $dir/${module}-${lastdist}.tar.gz) +# Make the diff +echo Diffing... +rm -f /tmp/$diff +(cd /tmp; diff -u -r ${module}-${secondlastdist} ${module}-${lastdist} > $diff) +# Remove the dist dirs +rm -rf /tmp/${module}-${secondlastdist} /tmp/${module}-${lastdist} + +if [ -s /tmp/$diff ]; then + # Mail a message saying the new diff is available. (Commented out for now) + # mail -s $diff < $diff $diff_recipients + gzip -9 /tmp/$diff && mv -f /tmp/$diff.gz $dir +else + rm -f /tmp/$diff +fi diff --git a/upload-dist b/upload-dist new file mode 100755 index 000000000..ff6239208 --- /dev/null +++ b/upload-dist @@ -0,0 +1,40 @@ +#!/bin/sh + +# Copy a dist file to the ftp server +# if shell variable OLD is set to a version string, also copy a diff file. + +SOURCEDIR=$HOME/gnu/releases + +DESTHOST=alpha.gnu.ai.mit.edu +DESTDIR='~ftp/gnu/gnustep' + +# Load version variables +. Version + +DISTFILE=gstep-base-${VERSION}.tar.gz + +echo Uploading $DISTFILE to ${DESTHOST}:${DESTDIR} +cat ${SOURCEDIR}/${DISTFILE} \ + | rsh $DESTHOST \ + "(cd $DESTDIR; \ + cat >| ${DISTFILE})" + + +if [ $OLD ] ; then + # Also upload the diff file + + DIFFFILE=gstep-base-${OLD}-${VERSION}.diff.gz + + if [ ! -e ${SOURCEDIR}/${DIFFFILE} ] ; then + echo File ${SOURCEDIR}/${DIFFFILE} not found. + exit -1 + fi + + echo Uploading ${DIFFFILE} to ${DESTHOST}:${DESTDIR} + + cat ${SOURCEDIR}/${DIFFFILE} \ + | rsh $DESTHOST \ + "(cd $DESTDIR; \ + cat >| ${DIFFFILE})" + +fi