From 4a353b8be2f42a195815dd059946f930f8c113f8 Mon Sep 17 00:00:00 2001
From: mancini <mancini@astron.nl>
Date: Wed, 28 Jun 2023 20:13:48 +0200
Subject: [PATCH] Add support for other data sites

---
 steps/fetch_data.cwl | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/steps/fetch_data.cwl b/steps/fetch_data.cwl
index 4dbb4675..391b8e84 100644
--- a/steps/fetch_data.cwl
+++ b/steps/fetch_data.cwl
@@ -24,9 +24,17 @@ requirements:
         entry: |
           #!/bin/bash
           mkdir out
-          cd out
-          turl=`echo $1 | awk '{gsub("srm://srm.grid.sara.nl[:0-9]*","gsiftp://gridftp.grid.sara.nl"); print}'`
-          echo "Downloading $turl"
-          globus-url-copy $turl - | tar -xvf -
+          
 
+          if [[ "$1" == *"lta-head.lofar.psnc.pl"* ]]; then
+              wget --no-check-certificate --read-timeout=5 --timeout 5 https://lta-download.lofar.psnc.pl/lofigrid/SRMFifoGet.py\?surl\=$1
+              cd out
+              tar -xvf ../*.tar 
+          else
+            cd out
+            turl=`echo $1 | awk '{gsub("srm://srm.grid.sara.nl[:0-9]*","gsiftp://gridftp.grid.sara.nl"); print}'`
+            turl=`echo $turl | awk '{gsub("srm://lofar-srm.fz-juelich.de[:0-9]*","gsiftp://lofar-gridftp.fz-juelich.de:2811"); print}'`
+            echo "Downloading $turl"
+            globus-url-copy $turl - | tar -xvf -
+          fi
     
-- 
GitLab