From: thierry Date: Tue, 23 Feb 2010 16:37:56 +0000 (+0000) Subject: manual script for creating PARTIAL-RPMS X-Git-Tag: foo~187 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3ff289fbec87aae6bae80dd42c0638ae8ea53e66;p=infrastructure.git manual script for creating PARTIAL-RPMS --- diff --git a/scripts/partial-repo.sh b/scripts/partial-repo.sh new file mode 100755 index 0000000..d087cd0 --- /dev/null +++ b/scripts/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|vserver)-.*-.*-.*-.*rpm') PARTIAL-RPMS/ + echo "==================== building packages index in $repo .." + createrepo PARTIAL-RPMS + echo '==================== DONE' + cd - >& /dev/null +done