aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-08-17 20:56:47 -0400
committerB. Stack <bgstack15@gmail.com>2021-08-17 20:56:47 -0400
commit34b63d170e0d18ae12ff55d7097157560c7f5f2f (patch)
treeaea82a3419bc75e2f46e9e4340b791a7264b3ea2
parentinitial commit (diff)
downloadcoprmirror-34b63d170e0d18ae12ff55d7097157560c7f5f2f.tar.gz
coprmirror-34b63d170e0d18ae12ff55d7097157560c7f5f2f.tar.bz2
coprmirror-34b63d170e0d18ae12ff55d7097157560c7f5f2f.zip
add YUMMIRROR_SCRIPT option to coprmirror
The sample path finds the running coprmirror.sh script and uses that directory.
-rw-r--r--coprmirror.conf.example1
-rwxr-xr-xcoprmirror.sh2
2 files changed, 2 insertions, 1 deletions
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}"
}
bgstack15