fetching a file from the Internet must be atomar
authorWolfram Schneider <wosch@indexdata.dk>
Mon, 17 Mar 2014 07:45:16 +0000 (08:45 +0100)
committerWolfram Schneider <wosch@indexdata.dk>
Mon, 17 Mar 2014 07:45:16 +0000 (08:45 +0100)
tools/htdocs/Makefile

index e152852..bbb6ba0 100644 (file)
@@ -69,10 +69,12 @@ ${JQUERY_FILE}:
        rm -f $@.new
 
 ${JQUERY_JSON_FILE}:
-       curl -sSf ${JQUERY_JSON_URL} -o $@
+       curl -sSf ${JQUERY_JSON_URL} -o $@.tmp
+       mv -f $@.tmp $@
 
 ${HANDLEBARS_FILE}:
-       curl -sSf ${HANDLEBARS_URL} -o $@
+       curl -sSf ${HANDLEBARS_URL} -o $@.tmp
+       mv -f $@.tmp $@
 
 ${PP2_FILE}:
        curl -sSf "${PP2_URL}" -o $@.tmp