#!/bin/sh -e VERSION=$1 if [ -z "$VERSION" ]; then echo "No version given" exit 1 fi svn update perl -pi -e "s/our \\\$VERSION =.*/our \\\$VERSION = '$VERSION';/" LATMOS-Accounts/lib/LATMOS/Accounts.pm perl -pi -e "s/our \\\$VERSION =.*/our \\\$VERSION = '$VERSION';/" LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm find -name "*.tar.gz" -o -name "*.rpm" | xargs rm ( cd LATMOS-Accounts perl Makefile.PL make rpm ) ( cd LATMOS-Accounts-Web/; perl Makefile.PL; make rpm ) ( cd .. svn cp trunk tags/$VERSION ) rsync -avPH ./LATMOS-Accounts/noarch/latmos-accounts-*-*.noarch.rpm ./LATMOS-Accounts-Web/noarch/latmos-accounts-web-*-*.noarch.rpm root@yuko.aero.jussieu.fr:/tmp rsync -avPH ./LATMOS-Accounts/noarch/latmos-accounts-*-*.noarch.rpm ./LATMOS-Accounts-Web/noarch/latmos-accounts-web-*-*.noarch.rpm root@kohane.aero.jussieu.fr:/tmp rsync -avPH ./LATMOS-Accounts/noarch/latmos-accounts-*-*.noarch.rpm \ ./LATMOS-Accounts-Web/noarch/latmos-accounts-web-*-*.noarch.rpm \ nanardon@forge.ipsl.jussieu.fr:/ipsl/forge/projets/link-accounts/web/release/${VERSION}/ ssh root@kohane.aero.jussieu.fr rpm -Fvh /tmp/*.rpm