#!/bin/bash
umask u=rwx,g=rx,o=rx

VERSION=`./cbmc --version`

echo $VERSION

mkdir /tmp/cbmc-dist
cd /tmp/cbmc-dist
git clone http://www.github.com/diffblue/cbmc --branch cbmc-${VERSION} cbmc-src --single-branch
rm -Rf cbmc-src/.git
tar cfz cbmc-${VERSION}-src.tgz cbmc-src/

echo Copying.
scp cbmc-${VERSION}-src.tgz \
  kroening@dkr-srv.cs.ox.ac.uk:/srv/www/cprover.org/cbmc/download/

cd /tmp
rm -R /tmp/cbmc-dist
