#!/bin/sh TMP_DIR=$(mktemp -d) CURRENT_DIR=$(pwd) SVN_PATH="https://svn.lliurex.net/xenial/lliurex-version-timestamp/" MIRROR="/srv/nfs/lliurex1609/xenial" echo "* Downloading lliurex-version-timestamp..." cd $TMP_DIR svn co $SVN_PATH cd lliurex-version-timestamp/trunk/fuentes echo "* Updating changelog..." src/updatepackage.sh svn st svn ci -m "updating pkg" RC=$? echo "" if [ "$RC" = "0" ]; then echo "* Building lliurex-version-timestamp package..." svn-buildpackage -us -uc -sa -rfakeroot 1>/dev/null 2>/dev/null ls -la ../build-area/ LASTVERSION=$(dpkg-parsechangelog --show-field Version) echo $LASTVERSION DEB_FILE="../build-area/lliurex-version-timestamp_${LASTVERSION}_all.deb" echo "* Including deb to mirror... " sudo reprepro -b $MIRROR includedeb xenial $DEB_FILE else echo "Nothing to do. Exiting" exit 1 fi cd $CURRENT_DIR rm -rf $TMP_DIR