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

More tweaks for OS X.

parent 3fc531cb
Branches
Tags
No related merge requests found
...@@ -3,24 +3,27 @@ ...@@ -3,24 +3,27 @@
# Generate a snapshot from svn. This script tries to check-out a new # Generate a snapshot from svn. This script tries to check-out a new
# copy from svn, and then run "autoreconf" and "make distcheck". # copy from svn, and then run "autoreconf" and "make distcheck".
MYTMPDIR="${TMPDIR:-/disk1/claus/tmp}/alberta.$$" PATH=/opt/local/bin:$PATH
SVNREPOS=https://scwww.math.uni-augsburg.de/repos/alberta export PATH
MYTMPDIR="${TMPDIR:-/Volumes/DataHD/Shared/software/ALBERTA/snapshots}/alberta.$$"
SVNREPOS=https://imperium.math.uni-duisburg.de/alberta/subversion
ALBERTADIST=trunk/albertadist ALBERTADIST=trunk/albertadist
DATE=$(date --utc '+%Y%m%d') DATE=$(date -u '+%Y%m%d')
SNAPSHOTDIR=/hosts/www/www/htdocs/IAM/homepages/claus/download/alberta/snapshots SNAPSHOTDIR=/Volumes/DataHD/Shared/software/ALBERTA/snapshots
NSNAPSHOTS=10 # keep only the most recent 10 snapshots NSNAPSHOTS=10 # keep only the most recent 10 snapshots
test -d ${TMPDIR} || mkdir -p ${TMPDIR} test -d ${TMPDIR} || mkdir -p ${TMPDIR}
# Pray that we have a running ssh-agent (and only one ...) # Pray that we have a running ssh-agent (and only one ...)
: ${SSH_AGENT_PID=`ps -u claus |grep ssh-agent|awk '{ print $1; }'`} #: ${SSH_AGENT_PID=`ps -u claus |grep ssh-agent|awk '{ print $1; }'`}
: ${SSH_AUTH_SOCK=`find /tmp -user claus -name "agent.[0-9]*"`} #: ${SSH_AUTH_SOCK=`find /tmp -user claus -name "agent.[0-9]*"`}
export SSH_AGENT_PID SSH_AUTH_SOCK #export SSH_AGENT_PID SSH_AUTH_SOCK
if test -z "${SSH_AGENT_PID}" -o -z "${SSH_AUTH_SOCK}"; then #if test -z "${SSH_AGENT_PID}" -o -z "${SSH_AUTH_SOCK}"; then
echo "No running ssh-agent found" 1>&2 # echo "No running ssh-agent found" 1>&2
exit 1 # exit 1
fi #fi
trap "chmod -R u+rwX ${MYTMPDIR} ; rm -rf ${MYTMPDIR}" 0 trap "chmod -R u+rwX ${MYTMPDIR} ; rm -rf ${MYTMPDIR}" 0
...@@ -30,7 +33,7 @@ svn co ${SVNREPOS}/${ALBERTADIST} albertadist ...@@ -30,7 +33,7 @@ svn co ${SVNREPOS}/${ALBERTADIST} albertadist
cd albertadist cd albertadist
# own revision # own revision
HEADREV=`svn info|awk '/Revision:/ { print $2; }'` HEADREV=`svn info|awk '/Revision:/ { print $2; }'`
LASTREV=`{ ls -C1 --color=no ${SNAPSHOTDIR}/*.gz || true; }|tail -n 1|cut -d '-' -f 3|cut -d '.' -f 1` LASTREV=`{ ls -C1 ${SNAPSHOTDIR}/*.gz || true; }|tail -n 1|cut -d '-' -f 3|cut -d '.' -f 1`
if test -n "${LASTREV}"; then if test -n "${LASTREV}"; then
# figure out if anything has changed. # figure out if anything has changed.
for i in . alberta alberta_util demo add_ons doc; do for i in . alberta alberta_util demo add_ons doc; do
...@@ -54,7 +57,7 @@ fi ...@@ -54,7 +57,7 @@ fi
# attach the time-stamp to the package # attach the time-stamp to the package
# #
VERSTAMP="${DATE}-${HEADREV}" VERSTAMP="${DATE}-${HEADREV}"
sed -i -e 's/AC_INIT(\[alberta\], [^,]\+,/AC_INIT([alberta], ['"${VERSTAMP}"'],/g' configure.ac sed -i "" -e 's/AC_INIT(\[alberta\], [^,]*,/AC_INIT([alberta], ['"${VERSTAMP}"'],/g' configure.ac
./fromsvnreconf.sh ./fromsvnreconf.sh
./configure --enable-maintainer-mode || exit 1 ./configure --enable-maintainer-mode || exit 1
make || exit 1 make || exit 1
...@@ -64,7 +67,7 @@ if test -f "alberta-${VERSTAMP}.tar.bz2" -a \ ...@@ -64,7 +67,7 @@ if test -f "alberta-${VERSTAMP}.tar.bz2" -a \
-f "alberta-${VERSTAMP}.tar.gz"; then -f "alberta-${VERSTAMP}.tar.gz"; then
mkdir -p ${SNAPSHOTDIR} || true mkdir -p ${SNAPSHOTDIR} || true
cp alberta-${VERSTAMP}.tar.bz2 alberta-${VERSTAMP}.tar.gz ${SNAPSHOTDIR} cp alberta-${VERSTAMP}.tar.bz2 alberta-${VERSTAMP}.tar.gz ${SNAPSHOTDIR}
rm -f `ls --color=no -C1 ${SNAPSHOTDIR}/*.tar.gz|head -n -${NSNAPSHOTS}` rm -f `ls -C1 ${SNAPSHOTDIR}/*.tar.gz|head -n -${NSNAPSHOTS}`
rm -f `ls --color=no -C1 ${SNAPSHOTDIR}/*.tar.bz2|head -n -${NSNAPSHOTS}` rm -f `ls -C1 ${SNAPSHOTDIR}/*.tar.bz2|head -n -${NSNAPSHOTS}`
chmod -R a+rX ${SNAPSHOTDIR} chmod -R a+rX ${SNAPSHOTDIR}
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment