mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 12:52:10 +00:00
Switch soem things from find -exec to xargs
Allows better filtering and doesn't supress exit codes. Since I'm no longer supressing exit codes, I had to handle them properly in copy-file-to-xhtml.sh by using if-statements. This also allowed me to skip the generation of an XHTML redirect page.
This commit is contained in:
parent
6487c5c7f3
commit
866ca1b386
2 changed files with 7 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -128,7 +128,7 @@ xhtmlize:
|
||||||
|
|
||||||
.PHONY: copy-to-xhtml
|
.PHONY: copy-to-xhtml
|
||||||
copy-to-xhtml:
|
copy-to-xhtml:
|
||||||
find $(OUTPUT_DIR) -type f -name "*.html" -exec sh scripts/copy-file-to-xhtml.sh {} \;
|
find $(OUTPUT_DIR) -type f -name "*.html" | grep -v 'resume/index.html' | xargs -n1 sh scripts/copy-file-to-xhtml.sh
|
||||||
|
|
||||||
.PHONY: deploy-html
|
.PHONY: deploy-html
|
||||||
deploy-html:
|
deploy-html:
|
||||||
|
|
|
@ -9,5 +9,9 @@ html_file="$1"
|
||||||
xhtml_file="${html_file%*.html}.xhtml"
|
xhtml_file="${html_file%*.html}.xhtml"
|
||||||
|
|
||||||
cp -p "$html_file" "$xhtml_file"
|
cp -p "$html_file" "$xhtml_file"
|
||||||
[ -f "$html_file.gz" ] && cp -p "$html_file.gz" "$xhtml_file.gz"
|
if [ -f "$html_file.gz" ]; then
|
||||||
[ -f "$html_file.br" ] && cp -p "$html_file.br" "$xhtml_file.br"
|
cp -p "$html_file.gz" "$xhtml_file.gz"
|
||||||
|
fi
|
||||||
|
if [ -f "$html_file.br" ]; then
|
||||||
|
cp -p "$html_file.br" "$xhtml_file.br"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue