From 18a77b21c8a4c54cee7a7d4a8eff79a041a318d9 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Wed, 13 Jul 2022 11:05:21 +0000
Subject: [PATCH] Use JUGGLER_DETECTOR_REPOSITORYURL and BEAMLINE_REPOSITORYURL

---
 bin/build_detector.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/bin/build_detector.sh b/bin/build_detector.sh
index d952183..3803f3f 100755
--- a/bin/build_detector.sh
+++ b/bin/build_detector.sh
@@ -40,9 +40,8 @@ if [ -n "${JUGGLER_DETECTOR_DEPLOY_TOKEN_USERNAME:-}" -a -n "${JUGGLER_DETECTOR_
 else
   DEPLOY_TOKEN=""
 fi
-echo "git clone -b ${JUGGLER_DETECTOR_VERSION} --depth 1 https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git"
-git clone -b ${JUGGLER_DETECTOR_VERSION} --depth 1 https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git
-[[ "$?" == "0" ]]  ||  exit 1
+echo "git clone -b ${JUGGLER_DETECTOR_VERSION} --depth 1 ${JUGGLER_DETECTOR_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git}"
+git clone -b ${JUGGLER_DETECTOR_VERSION} --depth 1 ${JUGGLER_DETECTOR_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git}
 if [ -f "${JUGGLER_DETECTOR}/requirements.txt" ] ; then
   python -m pip install -r ${JUGGLER_DETECTOR}/requirements.txt
 fi
@@ -61,8 +60,8 @@ if [ -n "${BEAMLINE_CONFIG_DEPLOY_TOKEN_USERNAME:-}" -a -n "${BEAMLINE_CONFIG_DE
 else
   DEPLOY_TOKEN=""
 fi
-echo "git clone -b ${BEAMLINE_CONFIG_VERSION} --depth 1 https://eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE_CONFIG}.git"
-git clone -b ${BEAMLINE_CONFIG_VERSION} --depth 1 https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE_CONFIG}.git
+echo "git clone -b ${BEAMLINE_CONFIG_VERSION} --depth 1 ${BEAMLINE_REPOSITORYURL:-https://eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE_CONFIG}.git}"
+git clone -b ${BEAMLINE_CONFIG_VERSION} --depth 1 ${BEAMLINE_REPOSITORYURL:-https://${DEPLOY_TOKEN}eicweb.phy.anl.gov/EIC/detectors/${BEAMLINE_CONFIG}.git}
 [[ "$?" == "0" ]]  ||  exit 1
 rm -rf "${BEAMLINE_CONFIG}/.git"
 
-- 
GitLab