From 24c603886e6faea131bc43305244700a2f0bc26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lawrence=20Vel=C3=A1zquez?= Date: Mon, 12 Sep 2016 01:59:10 +0000 Subject: [PATCH] mpbb: Don't hardcode jobs tools location The location of the jobs tools is used in a couple of places, so don't repeat ourselves. git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152531 d073be05-634f-4543-b044-5fe20cf6d1d6 --- mpbb | 1 + mpbb-checkout | 2 +- mpbb-gather-archives | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mpbb b/mpbb index ddb28d6..c44c1b2 100755 --- a/mpbb +++ b/mpbb @@ -119,6 +119,7 @@ parseopt prefix:,work-dir: "$@" || exit # shellcheck disable=SC2034 disable=SC2154 # Not really options, but pretend they are because they're global. +option_jobs_dir=${option_work_dir}/tools option_log_dir=${option_work_dir}/logs # shellcheck disable=SC2086 diff --git a/mpbb-checkout b/mpbb-checkout index 6e4d767..5178103 100644 --- a/mpbb-checkout +++ b/mpbb-checkout @@ -95,7 +95,7 @@ checkout() { # shellcheck disable=SC2100 disable=SC2154 if svn=${option_svn:-$(command -v svn)}; then checkout=svn-checkout - jobs_dir=${option_work_dir}/tools + jobs_dir=${option_jobs_dir} if [[ -n ${option_svn_url+_} ]]; then : "${option_jobs_url=${option_svn_url}/base/portmgr/jobs}" : "${option_ports_url=${option_svn_url}/dports}" diff --git a/mpbb-gather-archives b/mpbb-gather-archives index 940840a..d193e8d 100644 --- a/mpbb-gather-archives +++ b/mpbb-gather-archives @@ -56,9 +56,9 @@ gather-archives() { archive_basename=$(basename "${archive_path}") if ! curl -fIsL "${option_archive_site}/${archive_port}/${archive_basename}" > /dev/null; then - # $option_work_dir is set in mpbb + # $option_jobs_dir is set in mpbb # shellcheck disable=SC2154 - if "${tclsh}" "${option_work_dir}/tools/port_binary_distributable.tcl" -v "${archive_port}"; then + if "${tclsh}" "${option_jobs_dir}/port_binary_distributable.tcl" -v "${archive_port}"; then echo "Staging archive for upload: ${archive_basename}" mkdir -p "${option_staging_dir}/${archive_port}" || { status=$?; break; } ln "${archive_path}" "${option_staging_dir}/${archive_port}/${archive_basename}" || { status=$?; break; }