#!/bin/sh # # This script supports remote-building RPMS on any host machine where you can # do SVN checkouts. It is intended for use by GPSD release engineers. # # You will require an account that you can ssh into on the remote # machine(s), and that account must have an initialized SVN mirror of the # gpsd sources set up in it. # # The magic for an svn checkout to a remote machine, which you will have # to do at least once before using this script. is: # svn checkout http://svn.berlios.de/svnroot/repos/gpsd/trunk # # The remote machine must have zip(1) and the buildrpms(1) script from # ESR's shipper distribution available on your search path. # The local machine must have unzip(1) on its search path. # # Use the first arg to specify the architecture you want to build for; # this will dispatch to a suitable host machine. Use the second arg, # if necessary, to override the remote directory location where building # will be done. arch=$1 dir=${2:-\~/svn/gpsd/trunk/} local=/tmp/rpm$$.zip echo "RPMs will be built in $dir on the remote machine." 1>&2 case $1 in i386) # The outer ssh tunnels through the thyrsus.com NAT/firewall ssh thyrsus.com "ssh minx 'cd $dir; ./putrpm i386'" >$local ;; x86_64) # The outer ssh tunnels through the thyrsus.com NAT/firewall ssh thyrsus.com "ssh snark 'cd $dir; ./putrpm x86_64'" >$local ;; *) echo "$arch is not a known architecture." esac echo "Zipfile delivered to ${local}." unzip $local rm $local