A modified tar_scm that uses a 'cfgterm' that is searched for in the obs project config. It's a little hackish, but it's an example of what you can do. This way, it's possible to have the same _service file in: some_project and home:ttelford:some_project due to differences in the 'cfgterm', the end result can be very different - because it's pulling from an entirely different scm branch. It makes it a lot easier to have multiple developers, each working on their own piece of the code To set up a new user, it just takes a loop of 'osc copy' and one 'osc meta prjconf'. It's a lot less work than modifying the _service file in x packages each time there's a new user. --- tar_scm 2011-09-13 13:40:51.873444973 -0600 +++ tar_scm_branch 2011-09-13 16:03:25.665728335 -0600 @@ -19,6 +19,7 @@ MYREVISION="" MYPACKAGEMETA="" MYGITARGS="--depth 1" +PROJECT="" while test $# -gt 0; do case $1 in @@ -34,8 +35,8 @@ MYSUBDIR="$2" shift ;; - *-revision) - MYREVISION="$2" + *-cfgterm) + CFGTERM="$2" shift ;; *-version) @@ -83,6 +84,27 @@ shift done +# Get the actual revision from the configuration file(s): +# Verify config file exists: +if [[ -f /srv/obs/projects/${PROJECT}.conf ]] +then + if [[ ! -z ${CFGTERM} ]] + then + MYREVISION=$(cat /srv/obs/projects/${PROJECT}.conf | grep -E ${CFGTERM} | awk '{print $2}') + if [[ -z MYREVISION ]] + then + echo "Revision search term not found." + exit 1 + fi + else + echo "Config search term not defined!" + exit 1 + fi +else + echo "project config for ${PROJECT} does not exist." + exit 1 +fi + FILE="$MYFILENAME" VERSION="$MYVERSION" if [ -z "$MYPACKAGEMETA" ]; then -- Troy Telford -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org