File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
applications/workspaces/tasks/biomodels-copy Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 3030 echo " ${path} " >> filelist
3131 done
3232 echo Biomodels downloading files
33- aria2c --retry-wait=2 --max-tries=5 --input-file=filelist --max-concurrent-downloads=5 --max-connection-per-server=5 --allow-overwrite " true" --auto-file-renaming " false"
33+ # Move to temporary directory to rename only the downloaded files.
34+ # Otherwise we risk renaming all files, even ones where the user has used
35+ # '+' in the file name explicitly
36+ tempdir=$( mktemp -d)
37+ pushd " ${tempdir} "
38+ aria2c --retry-wait=2 --max-tries=5 --input-file=filelist --max-concurrent-downloads=5 --max-connection-per-server=5 --allow-overwrite " true" --auto-file-renaming " false"
39+ rename -a ' +' ' ' * .*
40+ popd
41+ mv " ${tempdir} /*" .
42+ # directory should be empty, so rmdir will work
43+ rmdir " ${tempdir} "
3444 rm filelist -f
3545fi
3646
You can’t perform that action at this time.
0 commit comments