mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1695 72102866-910b-0410-8b05-ffd578937521
58 lines
1.6 KiB
Bash
Executable file
58 lines
1.6 KiB
Bash
Executable file
#!/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
|