Select Git revision
SKASubarray.rst
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
fetch_data.cwl 939 B
id: fetchdata
label: fetch_data
class: CommandLineTool
cwlVersion: v1.1
inputs:
- id: surl_link
type: string
inputBinding:
position: 0
outputs:
- id: uncompressed
type: Directory
outputBinding:
glob: 'out/*'
baseCommand:
- 'bash'
- 'fetch.sh'
doc: 'Untar a compressed file'
requirements:
InlineJavascriptRequirement: {}
InitialWorkDirRequirement:
listing:
- entryname: 'fetch.sh'
entry: |
#!/bin/bash
mkdir out
cd out
if [[ $1 == *"sara.nl"* ]]; then
turl=`echo $1 | awk '{gsub("srm://srm.grid.sara.nl[:0-9]*","gsiftp://gridftp.grid.sara.nl"); print}'`
echo "Downloading $turl with globus-url-copy"
globus-url-copy $turl - | tar -xvf -
else
echo "Downloading $1 with srmcp"
srmcp $1 file:////`pwd`/\$(basename $1)
tar -xvf \$(basename $1)
fi