#!/bin/bash set_userproxy () { local proxy_file=$1 [ -f "$proxy_file" ] && export X509_USER_PROXY=${proxy_file} } download_file () { local f_location=$1 local f_name=$2 [ -z "${f_name}" ] && f_name=${f_location##*/} arccache get "${f_location}" "${f_name}" } download_files () { local files_list=$1 [ -f "$files_list" ] || return 1 while read f_src f_dct; do download_file $f_src $f_dct done < $files_list }