#!/bin/sh if [ -z "$REPOURL" ]; then echo "You need to specify \$REPOURL" exit 1 fi REPONAME=${REPONAME:="postrepo0"} cat << EOF >/etc/yum.repos.d/${REPONAME}.repo [${REPONAME}] name=${REPONAME} baseurl=$(eval echo ${REPOURL}) enabled=1 gpgcheck=0 skip_if_unavailable=1 EOF exit 0