Thread: wget question
View Single Post
  #5  
Old 19th February 2008, 17:04
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

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. http://www.sanesecurity.co.uk/clamav...nesecurity.txt
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote