Thread: wget question
View Single Post
Old 19th February 2008, 18:04
topdog topdog is offline
Senior Member
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts

Actually with curl you can get funky, use a temp directory in /tmp to download the stuff then check the curl return value if its an error then don't move the files from the temp location to the actual location, if there is no error condition then move the old files out and move new from the temp location.

For inspiration you can look at the script for sanesecurity updates it uses the same logic.
---- - Got Linux problems ? - I can help. - Try it.
Reply With Quote