From: Thierry Parmentelat Date: Wed, 23 Mar 2011 08:10:55 +0000 (+0100) Subject: utility for creating PARTIAL-RPMS for each node flavour X-Git-Tag: 5.0-rc23~107 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c8105bdff1a46df83bfa8e91aa237f9438d2417b;p=build.git utility for creating PARTIAL-RPMS for each node flavour --- diff --git a/partial-repo.sh b/partial-repo.sh new file mode 100755 index 00000000..09771c0e --- /dev/null +++ b/partial-repo.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# $URL$ + +COMMAND=$(basename $0) + +function usage () { + echo "Usage: $COMMAND repo1..." + echo " a 'RPMS' subdir is expected in each repo arg" + exit 1 +} + +[[ -n "$@" ]] || usage + +set -e + +for repo in "$@" ; do + if [ ! -d $repo/RPMS ] ; then + echo could not find $repo/RPMS - ignored + continue + fi + + cd $repo + echo "==================== Dealing with repo $repo" + mkdir -p PARTIAL-RPMS + rsync --archive --verbose $(find RPMS -type f | egrep '/(bootcd|bootstrapfs|noderepo)-.*-.*-.*-.*rpm') PARTIAL-RPMS/ + echo "==================== building packages index in $repo .." + createrepo PARTIAL-RPMS + echo '==================== DONE' + cd - >& /dev/null +done