Taking back a simple filter (for e g a sub-folder).I am a little bit intrigued by the fact that there is no "download all files in a folder" in the REST API ResponseCode=`cat response.header | sed -n '1p' | cut -d' ' -f2`Įcho Successfully downloaded artifact: $urlĮcho ERROR: Failed to download artifact: $url with error code: $responseCode Urls=($(cat $outputFile)) > /dev/null 2>&1Ĭurl -vks -u "$sourceUser:$sourcePassword" -D response.header -X GET "$url" -O > /dev/null 2>&1 # cat artifacts.temp | grep "$filter" > $outputFileĬontToken=( $(echo $response | sed -n 's|.*"continuationToken" : "\(*\)".*|\1|p') ) Sed 's///g' artifacts.temp > artifacts1.temp Sed 's/,//g' artifacts1.temp > artifacts.temp Sed 's/\"//g' artifacts.temp > artifacts1.temp Response=`curl -ksSL -u "$sourceUser:$sourcePassword" -X GET -header 'Accept: application/json' "$url"` Url=$sourceServer"/service/rest/v1/assets?continuationToken="$contToken"&repository="$sourceRepoĮcho Processing repository token: $contToken | tee -a $logfile Url=$sourceServer"/service/rest/v1/assets?repository="$sourceRepo I know one issue is that the very first download this script initiates is put in the wrong directory. This script is by no means perfect and you may need to edit it. I slightly modified it and posted it below. The script above really helped me with this issue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |