#!/bin/bash DEB_SERVER=http://localhost:9010/apt-i386 echo "starting build..." ./build if [ "$?" = "0" ]; then echo "build succeeded" if [ ! -z "$PACKAGE" ]; then echo "publishing ubuntu package (.deb)" DEBPATH=`find target/deb -name *.deb` DEBNAME=`basename $DEBPATH` curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME if [ "$?" != "0" ]; then echo "deb publish failed" exit 1 fi echo "done publishing deb" fi else echo "build failed" exit 1 fi