mirror of
https://github.com/simonmichael/hledger.git
synced 2024-10-06 10:57:30 +03:00
;tools: checkembeddedfiles: make it more robust
This commit is contained in:
parent
82230e5a1f
commit
3f5f99a1e9
@ -7,7 +7,7 @@ $rg --version >/dev/null
|
|||||||
|
|
||||||
echo "Checking embedded file declarations:"
|
echo "Checking embedded file declarations:"
|
||||||
status=0
|
status=0
|
||||||
for f in $($rg -I '^ +\$\(embedFileRelative "([^"]+)"' -or '$1'); do
|
for f in $($rg -I '\$\(embedFileRelative "([^"]+)"' -or '$1'); do
|
||||||
if output=$($rg -l "$f" -- */package.yaml); then
|
if output=$($rg -l "$f" -- */package.yaml); then
|
||||||
printf '%-40s\tdeclared in %s\n' "$f" "$output"
|
printf '%-40s\tdeclared in %s\n' "$f" "$output"
|
||||||
else
|
else
|
||||||
@ -15,5 +15,6 @@ for f in $($rg -I '^ +\$\(embedFileRelative "([^"]+)"' -or '$1'); do
|
|||||||
status=1
|
status=1
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $status != 0 ]]; then echo FAIL; else echo ok; fi
|
if [[ $status != 0 ]]; then echo FAIL; else echo ok; fi
|
||||||
exit $status
|
exit $status
|
||||||
|
Loading…
Reference in New Issue
Block a user