aboutsummaryrefslogtreecommitdiff
path: root/2-upload-srpms.sh
blob: 3a78ba18bcec992b0814b2b8b923a7e3df42d6e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# File: 2-upload-srpms.sh
# Author: bgstack15
# SPDX-License-Identifer: GPL-3.0
# Startdate: 2022-05-17 11:54
# Title: Upload SRPMs to copr
# Project: build-radicale-centos7
# Purpose: upload the generated srpms to copr in order
# History:
# Improve:
# Reference:
# Dependencies:
#    valid ~/.config/copr for copr authentication
# Documentation:
#    README.md

SCRIPTDIR="$( dirname "$( readlink -f "${0}" )" )"
. "${SCRIPTDIR}/lib.sh"
set -x
file_coverage=~/rpmbuild/SRPMS/"$( get_latest ~/rpmbuild/SRPMS "python-coverage*.src.rpm" )"
file_dateutil=~/rpmbuild/SRPMS/"$( get_latest ~/rpmbuild/SRPMS "python-dateutil*.src.rpm" )"
file_vobject=~/rpmbuild/SRPMS/"$( get_latest ~/rpmbuild/SRPMS "python-vobject*.src.rpm" )"
file_nose=~/rpmbuild/SRPMS/"$( get_latest ~/rpmbuild/SRPMS "python-nose*.src.rpm" )"
file_passlib=~/rpmbuild/SRPMS/"$( get_latest ~/rpmbuild/SRPMS "python-passlib*.src.rpm" )"
file_radicale=~/rpmbuild/SRPMS/"$( get_latest ~/rpmbuild/SRPMS "radicale*.src.rpm" )"

# By omitting the --nowait, we can cause the background jobs to delay so we
# operate in the correct order.
copr-cli build "${COPR_REPO}" "${file_coverage}" & job_coverage=$!
copr-cli build "${COPR_REPO}" "${file_dateutil}" & job_dateutil=$!
wait ${job_dateutil} && { copr-cli build "${COPR_REPO}" "${file_vobject}" & job_vobject=$! ; }
wait ${job_coverage} && { copr-cli build "${COPR_REPO}" "${file_nose}" & job_nose=$! ; }
wait ${job_nose} && { copr-cli build "${COPR_REPO}" "${file_passlib}" & job_passlib=$! ; }
wait ${job_passlib} ${job_vobject} && { copr-cli build "${COPR_REPO}" "${file_radicale}" & job_radicale=$! ; }

echo "DONE"
bgstack15