SyneRBI / SIRF-Exercises

SIRF Training and demonstration material
http://www.ccpsynerbi.ac.uk
Apache License 2.0
18 stars 21 forks source link

Docker doesn't have rsync #104

Closed ashgillman closed 3 years ago

ashgillman commented 3 years ago

When building Docker:

/devel/SIRF-Exercises/scripts/download_data.sh: line 195: rsync: command not found
ashgillman commented 3 years ago

I used rsync for the -u and -a flags, but on closer inspection, good old cp supports these

KrisThielemans commented 3 years ago

ok. what about checking if rsync is present, if so use it, otherwise use cp? More complicated, but rsync does feel nicer. It could prevent problems with files being open in one notebook, and people redownloading again by accident.

ashgillman commented 3 years ago

I think cp -ua X Y and rsync -ua X Y are almost functionally equivalent? Make a copy, but only if src is newer, and maintain all file metadata?

KrisThielemans commented 3 years ago

alright! I didn't know that.

Please check if MacOS cp supports it...

ashgillman commented 3 years ago

No, MacOS doesn't... I'll make a function

ashgillman commented 3 years ago

It was getting bigger than Ben Hur, I think just using cp is acceptable. These scripts I suppose would be re-written in Python for #83 ?

KrisThielemans commented 3 years ago

agreed