mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-04 02:20:48 +00:00
Make diffs of the Makefile-generated snapshot files, not the CVS repository.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1547 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b54e038555
commit
2ecdd1b7d6
1 changed files with 28 additions and 28 deletions
56
make-diff
56
make-diff
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# The directory in which to find the last snapshot
|
# The directory in which to find the last snapshot; must be absolute path
|
||||||
dir=../releases
|
dir=/home/mccallum/gnu/releases
|
||||||
|
|
||||||
# The email addresses of people to receive mail about the new diff
|
# The email addresses of people to receive mail about the new diff
|
||||||
diff_recipients=drepper
|
diff_recipients=drepper
|
||||||
|
@ -18,46 +18,46 @@ dptn="${ptn}-${yrptn}.diff"
|
||||||
date=`date +%y%m%d`
|
date=`date +%y%m%d`
|
||||||
|
|
||||||
# Find date of the last snapshot
|
# Find date of the last snapshot
|
||||||
lastsnap=`cd $dir; ls $ptn.tar.gz $dptn $dptn.gz 2>/dev/null |
|
lastsnap=`cd $dir; ls $ptn.tar.gz 2>/dev/null |
|
||||||
sed -e "s/^.*\\(${yrptn}\\)[.a-z]*$/\\1/" |
|
sed -e "s/^.*\\(${yrptn}\\)[.a-z]*$/\\1/" |
|
||||||
sort -nr | head -1`
|
sort -nr | head -1`
|
||||||
|
|
||||||
|
# Find the date of the second-to-last snapshot
|
||||||
|
secondlastsnap=`cd $dir; ls $ptn.tar.gz 2>/dev/null |
|
||||||
|
sed -e "s/^.*\\(${yrptn}\\)[.a-z]*$/\\1/" |
|
||||||
|
sort -nr | head -2 | tail -1`
|
||||||
|
|
||||||
# Find the date of the last diff
|
# Find the date of the last diff
|
||||||
lastdiff=`cd $dir; ls $dptn $dptn.gz 2>/dev/null |
|
lastdiff=`cd $dir; ls $dptn $dptn.gz 2>/dev/null |
|
||||||
sed -e "s/^.*\\(${yrptn}\\)[.a-z]*$/\\1/" |
|
sed -e "s/^.*\\(${yrptn}\\)[.a-z]*$/\\1/" |
|
||||||
sort -nr | head -1`
|
sort -nr | head -1`
|
||||||
|
|
||||||
# Will we make a CVS tag for this snapshot? An empty value means `tag it'.
|
echo Making diff between $secondlastsnap and $lastsnap
|
||||||
# Always disabled for now.
|
|
||||||
notag=yes
|
|
||||||
|
|
||||||
if [ $lastsnap = $date ]; then
|
|
||||||
if [ $lastdiff = $lastsnap ]; then
|
|
||||||
echo "$0: Snapshot diff for ${module}-${date} already made, skipping."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# There is already a full snapshot for this date, but no diffs.
|
|
||||||
# Don't re-tag, just make diffs.
|
|
||||||
notag=yes
|
|
||||||
lastsnap=$lastdiff
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The name of the diff file
|
# The name of the diff file
|
||||||
diff="${module}-${lastdiff}-${date}.diff"
|
diff="${module}-${secondlastsnap}-${lastsnap}.diff"
|
||||||
|
|
||||||
|
if [ -f $dir/$diff ]; then
|
||||||
|
echo $dir/$diff already exists! Exiting.
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
echo Making $diff
|
echo Making $diff
|
||||||
|
|
||||||
# If $notag is empty, `cvs rtag' the repository
|
# Untar the old snapshot
|
||||||
#test -z "$notag" && cvs -q rtag -F snapshot-$date $module
|
(cd /tmp ; tar -zvxf $dir/${module}-${secondlastsnap}.tar.gz)
|
||||||
|
# Untar the new snapshot
|
||||||
|
(cd /tmp ; tar -zvxf $dir/${module}-${lastsnap}.tar.gz)
|
||||||
|
# Make the diff
|
||||||
|
echo Diffing...
|
||||||
|
rm -f /tmp/$diff
|
||||||
|
(cd /tmp; diff -u -r ${module}-${secondlastsnap} ${module}-${lastsnap} > $diff)
|
||||||
|
# Remove the snapshot dirs
|
||||||
|
rm -rf /tmp/${module}-${secondlastsnap} /tmp/${module}-${lastsnap}
|
||||||
|
|
||||||
# Have cvs make the diff for us.
|
if [ -s /tmp/$diff ]; then
|
||||||
#cvs -q rdiff -u -r snapshot-$lastdiff -r snapshot-$date $module >$diff || exit
|
|
||||||
cvs rdiff -u -r snapshot-$lastdiff $module > $diff || exit
|
|
||||||
|
|
||||||
if [ -s $diff ]; then
|
|
||||||
# Mail a message saying the new diff is available. (Commented out for now)
|
# Mail a message saying the new diff is available. (Commented out for now)
|
||||||
# mail -s $diff < $diff $diff_recipients
|
# mail -s $diff < $diff $diff_recipients
|
||||||
gzip -9 $diff && mv -f $diff.gz $dir
|
gzip -9 /tmp/$diff && mv -f /tmp/$diff.gz $dir
|
||||||
else
|
else
|
||||||
rm -f $diff
|
rm -f /tmp/$diff
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue