mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
*** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1683 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bab9fadeb5
commit
2ee71c286e
1 changed files with 0 additions and 63 deletions
63
make-diff
63
make-diff
|
@ -1,63 +0,0 @@
|
|||
#!/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=drepper
|
||||
|
||||
# The name of this module
|
||||
module=gstep-base
|
||||
# A regular expression for the six-digit date string "yymmdd"
|
||||
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 date
|
||||
date=`date +%y%m%d`
|
||||
|
||||
# Find date of the last snapshot
|
||||
lastsnap=`cd $dir; ls $ptn.tar.gz 2>/dev/null |
|
||||
sed -e "s/^.*\\(${yrptn}\\)[.a-z]*$/\\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
|
||||
lastdiff=`cd $dir; ls $dptn $dptn.gz 2>/dev/null |
|
||||
sed -e "s/^.*\\(${yrptn}\\)[.a-z]*$/\\1/" |
|
||||
sort -nr | head -1`
|
||||
|
||||
echo Making diff between $secondlastsnap and $lastsnap
|
||||
|
||||
# The name of the diff file
|
||||
diff="${module}-${secondlastsnap}-${lastsnap}.diff"
|
||||
|
||||
if [ -f $dir/$diff ]; then
|
||||
echo $dir/$diff already exists! Exiting.
|
||||
exit -1
|
||||
fi
|
||||
echo Making $diff
|
||||
|
||||
# Untar the old snapshot
|
||||
(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}
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue