Use a temporary file to avoid breaking production files on error
This commit is contained in:
parent
394451ffbc
commit
38d514edbd
9
Makefile
9
Makefile
|
@ -6,12 +6,14 @@ export XIDEL_OPTIONS:=--silent --user-agent=$(USER_AGENT) --wait=1 --trace-stack
|
|||
|
||||
opml/%.opml: xquery/opml/%.xqy xquery/functions.xqy
|
||||
mkdir -p -ma=x,u=rwx $(dir $@)
|
||||
xidel --extract-kind=xquery3 --extract-file="$<" --output-format=xml > $@
|
||||
xidel --extract-kind=xquery3 --extract-file="$<" --output-format=xml > $@.new
|
||||
mv $@.new $@
|
||||
chmod a=r,u=rw $@
|
||||
|
||||
opml/feeds.opml: xquery/opml/feeds.xqy feed.xml
|
||||
mkdir -p -ma=x,u=rwx $(dir $@)
|
||||
xidel feed.xml --extract-kind=xquery3 --extract-file="$<" --output-format=xml > $@
|
||||
xidel feed.xml --extract-kind=xquery3 --extract-file="$<" --output-format=xml > $@.new
|
||||
mv $@.new $@
|
||||
chmod a=r,u=rw $@
|
||||
|
||||
img/sprites.png: $(wildcard img/sprites/*.png)
|
||||
|
@ -19,7 +21,8 @@ img/sprites.png: $(wildcard img/sprites/*.png)
|
|||
chmod a=r,u=rw $@
|
||||
|
||||
css/sprites.css: xquery/build_sprites_css.xqy img/sprites.png
|
||||
xidel --extract-kind=xquery3 --extract-file="$<" > $@
|
||||
xidel --extract-kind=xquery3 --extract-file="$<" > $@.new
|
||||
mv $@.new $@
|
||||
chmod a=r,u=rw $@
|
||||
|
||||
validate: xquery/validator.xqy feed.xml
|
||||
|
|
Loading…
Reference in New Issue