mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Changed from roland's version to something that makes sense for gstep-base.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1546 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c4e3610363
commit
b54e038555
2 changed files with 35 additions and 13 deletions
33
make-diff
33
make-diff
|
@ -1,28 +1,39 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
dir=/com/share/ftp/roland
|
# The directory in which to find the last snapshot
|
||||||
|
dir=../releases
|
||||||
|
|
||||||
|
# The email addresses of people to receive mail about the new diff
|
||||||
diff_recipients=drepper
|
diff_recipients=drepper
|
||||||
|
|
||||||
module=libc
|
# 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]'
|
yrptn='[0-9][0-9][0-9][0-9][0-9][0-9]'
|
||||||
|
# The pattern for the file containing the diff
|
||||||
ptn="${module}-${yrptn}"
|
ptn="${module}-${yrptn}"
|
||||||
dptn="${ptn}-${yrptn}.diff"
|
dptn="${ptn}-${yrptn}.diff"
|
||||||
|
|
||||||
|
# Get the current date
|
||||||
date=`date +%y%m%d`
|
date=`date +%y%m%d`
|
||||||
|
|
||||||
|
# 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 $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`
|
||||||
|
|
||||||
|
# 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`
|
||||||
|
|
||||||
notag=
|
# Will we make a CVS tag for this snapshot? An empty value means `tag it'.
|
||||||
|
# Always disabled for now.
|
||||||
|
notag=yes
|
||||||
|
|
||||||
if [ $lastsnap = $date ]; then
|
if [ $lastsnap = $date ]; then
|
||||||
if [ $lastdiff = $lastsnap ]; then
|
if [ $lastdiff = $lastsnap ]; then
|
||||||
echo "$0: Snapshot ${module}-${date} already made, skipping."
|
echo "$0: Snapshot diff for ${module}-${date} already made, skipping."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -32,12 +43,20 @@ if [ $lastsnap = $date ]; then
|
||||||
lastsnap=$lastdiff
|
lastsnap=$lastdiff
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The name of the diff file
|
||||||
diff="${module}-${lastdiff}-${date}.diff"
|
diff="${module}-${lastdiff}-${date}.diff"
|
||||||
test -z "$notag" && cvs -q rtag -F libc-$date $module
|
echo Making $diff
|
||||||
cvs -q rdiff -u -r $module-$lastdiff -r $module-$date $module > $diff || exit
|
|
||||||
|
# If $notag is empty, `cvs rtag' the repository
|
||||||
|
#test -z "$notag" && cvs -q rtag -F snapshot-$date $module
|
||||||
|
|
||||||
|
# Have cvs make the diff for us.
|
||||||
|
#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
|
if [ -s $diff ]; then
|
||||||
mail -s $diff < $diff $diff_recipients
|
# Mail a message saying the new diff is available. (Commented out for now)
|
||||||
|
# mail -s $diff < $diff $diff_recipients
|
||||||
gzip -9 $diff && mv -f $diff.gz $dir
|
gzip -9 $diff && mv -f $diff.gz $dir
|
||||||
else
|
else
|
||||||
rm -f $diff
|
rm -f $diff
|
||||||
|
|
|
@ -1,21 +1,24 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
dir=/com/share/ftp/roland
|
# The directory in which to find the last snapshot
|
||||||
|
dir=../releases
|
||||||
|
|
||||||
module=libc
|
# The name of this module
|
||||||
|
module=gstep-base
|
||||||
|
|
||||||
date=`date +%y%m%d`
|
date=`date +%y%m%d`
|
||||||
snap=${module}-${date}
|
snap=${module}-${date}
|
||||||
|
|
||||||
cvs -Q rtag -F $snap $module
|
cvs -Q rtag -F snapshot-$date $module
|
||||||
|
|
||||||
rm -rf $snap
|
rm -rf $snap
|
||||||
|
# Checkout the $module into a directory named $snap
|
||||||
cvs -Q checkout -d $snap -r $snap $module
|
cvs -Q checkout -d $snap -r $snap $module
|
||||||
tar -f - -co $snap | gzip -9v -c > $snap.tar.gz
|
tar -f - -co $snap | gzip -9v -c > $snap.tar.gz
|
||||||
|
|
||||||
find $snap \( -name CVS -prune \) -o \( -type f -print \) |
|
#find $snap \( -name CVS -prune \) -o \( -type f -print \) |
|
||||||
xargs md5sum | gzip -9v -c > $snap.md5sum.gz
|
#xargs md5sum | gzip -9v -c > $snap.md5sum.gz
|
||||||
|
|
||||||
rm -rf $snap &
|
rm -rf $snap &
|
||||||
|
|
||||||
mv -f $snap.tar.gz $snap.md5sum.gz $dir
|
mv -f $snap.tar.gz $dir
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue