From 34b63d170e0d18ae12ff55d7097157560c7f5f2f Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 17 Aug 2021 20:56:47 -0400 Subject: add YUMMIRROR_SCRIPT option to coprmirror The sample path finds the running coprmirror.sh script and uses that directory. --- coprmirror.conf.example | 1 + coprmirror.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/coprmirror.conf.example b/coprmirror.conf.example index eeb4310..317b213 100644 --- a/coprmirror.conf.example +++ b/coprmirror.conf.example @@ -3,6 +3,7 @@ copr_url="https://copr-be.cloud.fedoraproject.org/results/" copr="bgstack15/stackrpms" # choose which environments to exclude. Regex. excludes="epel-6.*|fedora-3[12].*|rhelbeta-8.*" +YUMMIRROR_SCRIPT="$( dirname "$( readlink -f "${0}" )" )/yummirror.sh" # These get sent to yummirror.sh workdir=~/dev/coprmirror/new logfile=./log/copr.$( date "+%FT%H%M%S" ) diff --git a/coprmirror.sh b/coprmirror.sh index 9e53aa7..c73abf1 100755 --- a/coprmirror.sh +++ b/coprmirror.sh @@ -41,7 +41,7 @@ test -z "${DRYRUN}" && { for word in ${listing} ; do echo "###########################################" - test -n "${DEBUG}" && echo env DEBUG=$DEBUG VERBOSE=$VERBOSE DRYRUN=$DRYRUN logfile="${logfile}.${word}" inurl="${copr_url}/${copr}/${word}/" this_user=${this_user} workdir="${workdir}/${word}" COPRMIRROR_CONF= ./yummirror.sh + test -n "${DEBUG}" && echo env DEBUG=$DEBUG VERBOSE=$VERBOSE DRYRUN=$DRYRUN logfile="${logfile}.${word}" inurl="${copr_url}/${copr}/${word}/" this_user=${this_user} workdir="${workdir}/${word}" COPRMIRROR_CONF= "${YUMMIRROR_SCRIPT}" test -z "${DRYRUN}" && { mkdir -p "${workdir}/${word}" } -- cgit