#!/bin/bash # $1: the repo path if [ $# -lt 1 ]; then exit 127 fi function update_one_repo() { # $1: repo path cd $1 createrepo_c --update x86_64 createrepo_c --update SRPMS cd $basedir } while [ $# -gt 0 ]; do update_one_repo $1 shift done