6 echo "Usage: $COMMAND repo1..."
7 echo " a 'RPMS' subdir is expected in each repo arg"
11 OPTS=$(getopt -o "ih" -- "$@")
12 if [ $? != 0 ]; then usage; fi
16 -i) INCREMENTAL=true; shift;;
24 for rpms_dir in $(find "$@" -name RPMS) ; do
25 pushd $rpms_dir >& /dev/null
27 echo "============================== Dealing with repo $(pwd)"
28 if [ -d PARTIAL-RPMS -a -n "$INCREMENTAL" ]; then
29 echo "$COMMAND - incremental mode"
30 echo "repo $rpms_dir already has a PARTIAL-RPMS - skipped"
35 echo "========== rsyncing relevant rpms into PARTIAL-RPMS"
36 rsync --archive --verbose $(find RPMS -type f | egrep '/(bootcd|bootstrapfs|nodeimage|noderepo|slicerepo)-.*-.*-.*-.*rpm') PARTIAL-RPMS/
37 echo "========== building packages index (i.e. running createrepo) in $(pwd)/PARTIAL-RPMS"
38 createrepo PARTIAL-RPMS
39 echo "========== DONE"