Skip to content
Snippets Groups Projects
Commit 0dade65d authored by Claus-Justus Heine's avatar Claus-Justus Heine
Browse files

Snapshot script.

parent 4956ae8c
No related branches found
No related tags found
No related merge requests found
#! /bin/sh
# Generate a snapshot from svn. This script tries to check-out a new
# copy from svn, and then run "autoreconf" and "make distcheck".
MYTMPDIR="${TMPDIR:-/tmp}/alberta2.$$"
SVNREPOS=svn+ssh://malaga.math.uni-augsburg.de/homes/proj/alberta/ALBERTA_SVN
ALBERTADIST=trunk/albertadist
DATE=$(date '+%Y%m%d')
SNAPSHOTDIR=/hosts/www/www/htdocs/IAM/homepages/claus/alberta/snapshots
NSNAPSHOTS=10 # keep only the most recent 10 snapshots
# Pray that we have a running ssh-agent (and only one ...)
SSH_AGENT_PID=`ps -u claus |grep ssh-agent|awk '{ print $1; }'`
SSH_AUTH_SOCK=`find /tmp -user claus -name "agent.[0-9]*"`
export SSH_AGENT_PID SSH_AUTH_SOCK
if test -z "${SSH_AGENT_PID}" -o -z "${SSH_AUTH_SOCK}"; then
echo "No running ssh-agent found" 1>&2
exit 1
fi
trap "chmod -$ u+rwX ${MYTMPDIR} ; rm -rf ${MYTMPDIR}" 0
mkdir -p "${MYTMPDIR}"
cd "${MYTMPDIR}"
svn co ${SVNREPOS}/${ALBERTADIST} albertadist
cd albertadist
#
# attach the time-stamp to the package
#
sed -i -e 's/AC_INIT([alberta2],[^,]\+,/AC_INIT([alberta2],['"${DATE}"'],/g' configure.ac
./fromsvnreconf.sh
./configure
make distcheck
if test -f "alberta2-${DATE}.tar.bz2" -a -f "alberta2-${DATE}.tar.gz"; then
mkdir -p ${SNAPSHOTDIR} || true
cp alberta2-${DATE}.tar.bz2 geomview-${DATE}.tar.gz ${SNAPSHOTDIR}
rm -f `ls --color=no -C1 ${SNAPSHOTDIR}/*.gz|head -n -${NSNAPSHOTS}`
chmod -R a+rX ${SNAPSHOTDIR}
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment