Skip to content

Commit

Permalink
check the tree even more afterwards, to be safe
Browse files Browse the repository at this point in the history
  • Loading branch information
mirabilos committed Jan 11, 2025
1 parent 2b3e6dd commit b54c7e9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,45 @@ pax -rw LICENSE.txt dist site/
rm -f site/dist/tests.js
find site -type d -print0 | xargs -0r chmod 0755 --
find site -type f -print0 | xargs -0r chmod 0644 --
set +ex
rv=0
x=$(find site \( ! -type d -a ! -type f -a ! -type l \) -ls) || {
print -ru2 -- "E: could not check for bogus filetypes"
rv=1
x=
}
[[ -z $x ]] || {
print -ru2 -- "E: bogus filetypes found"
print -r -- "$x" | sed 's/^/N: /' >&2
rv=1
}
if [[ $(find --help 2>&1) = *' -printf '* ]]; then
x=$(find site -type l -printf '(%Y)%p\n') || {
print -ru2 -- "E: could not check for dangling symlinks"
rv=1
x=
}
[[ -z $(print -r -- "$x" | grep -v '^[(][dfN][)]') ]] || {
print -ru2 -- "E: bad filetypes found"
print -r -- "$x" | sed 's/^/N: /' >&2
rv=1
}
x=$(print -r -- "$x" | grep '^[(]N[)]')
[[ -z $x ]] || {
if [[ -n $IS_ACTUAL_DEBIAN_BUILD ]]; then
pf=W:
(( rv |= 2 ))
else
pf=E:
rv=1
fi
print -ru2 -- "$pf dangling symlinks found"
print -r -- "$x" | sed 's/^/N: /' >&2
}
fi
if (( rv & 1 )); then
exit 1
elif (( rv == 0 )); then
print -ru2 -- "I: build done"
fi
exit 0

0 comments on commit b54c7e9

Please sign in to comment.