1999-01-09 18:59:58 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# Make a snapshot of the CVS head revision
|
|
|
|
|
1999-09-02 16:50:38 +02:00
|
|
|
exec >>/home/koch/mksnapshot.log 2>&1
|
|
|
|
|
|
|
|
echo "Started at `date`."
|
1999-01-09 18:59:58 +01:00
|
|
|
set -e
|
|
|
|
|
1999-07-24 11:59:06 +02:00
|
|
|
ftp_dir=$1
|
1999-01-09 18:59:58 +01:00
|
|
|
|
1999-07-24 11:59:06 +02:00
|
|
|
cd $HOME/pub
|
|
|
|
PATH="$HOME/bin:$PATH"
|
1999-01-09 18:59:58 +01:00
|
|
|
|
|
|
|
fix_version () {
|
|
|
|
version=$(cat $1/VERSION)
|
|
|
|
echo "$version-snap$(date +%Y-%m-%d)" >$1/VERSION
|
|
|
|
cat <<EOF >$1/SNAPSHOT
|
|
|
|
WARNING!
|
|
|
|
|
|
|
|
This is a snapshot of the current CVS head branch!
|
|
|
|
|
|
|
|
It may not compile or not work. Please don't report
|
|
|
|
bugs about this snapshot release it is just for your
|
2002-06-29 15:46:34 +02:00
|
|
|
convenience and to reduce the load of out CVS server.
|
1999-01-09 18:59:58 +01:00
|
|
|
|
|
|
|
Thanks,
|
|
|
|
|
|
|
|
Werner
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
1999-07-24 11:59:06 +02:00
|
|
|
build_dist () {
|
|
|
|
set +e
|
1999-09-02 16:50:38 +02:00
|
|
|
nice scripts/autogen.sh && nice ./configure && nice make dist
|
|
|
|
if ! awk '
|
|
|
|
/^diff gnupg-snapshot\/VERSION/ { getline; getline; getline; getline; next }
|
|
|
|
/^Common subdirectories:/ { next }
|
|
|
|
/~$/ { next }
|
|
|
|
{ exit 1 }
|
|
|
|
' ; then
|
|
|
|
# Okay, we have some changes and it is not only the version number
|
|
|
|
rm $ftp_dir/gnupg-*snap*-*-*.tar.gz
|
|
|
|
mv gnupg-*.tar.gz $ftp_dir/
|
|
|
|
fi
|
|
|
|
make distclean
|
1999-07-24 11:59:06 +02:00
|
|
|
set -e
|
|
|
|
}
|
|
|
|
|
1999-01-09 18:59:58 +01:00
|
|
|
|
1999-09-02 16:50:38 +02:00
|
|
|
|
1999-01-09 18:59:58 +01:00
|
|
|
do_export () {
|
|
|
|
pgm=$1
|
|
|
|
mod=$2
|
|
|
|
|
|
|
|
rm -rf $pgm.new || true
|
|
|
|
rm -rf $pgm.old || true
|
|
|
|
cvs -Q export -r HEAD -d $pgm.new $mod
|
|
|
|
fix_version $pgm.new
|
1999-07-24 11:59:06 +02:00
|
|
|
if [ -n "$ftp_dir" ]; then
|
|
|
|
here=$(pwd)
|
1999-09-02 16:50:38 +02:00
|
|
|
cd $pgm.new
|
|
|
|
build_dist
|
1999-07-24 11:59:06 +02:00
|
|
|
cd $here
|
|
|
|
fi
|
1999-01-09 18:59:58 +01:00
|
|
|
[ -d $pgm ] && mv $pgm $pgm.old
|
|
|
|
if ! mv $pgm.new $pgm ; then
|
|
|
|
echo "rename failed - restoring" >&2
|
|
|
|
mv $pgm.old $pgm
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
rm -rf $pgm.old || true
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
do_export gnupg-snapshot gnupg
|
|
|
|
|
1999-09-02 16:50:38 +02:00
|
|
|
echo "Ended at `date`."
|
1999-01-09 18:59:58 +01:00
|
|
|
exit 0
|
|
|
|
|