termux_step_massage: Check for `$PREFIX/$PREFIX`

which almost always indicates packaging error.
This commit is contained in:
Tee KOBAYASHI 2023-01-07 06:44:41 +09:00
parent 67bf160355
commit 72db1a09ff
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,12 @@ termux_step_massage() {
termux_error_exit "Package contains hard links: $HARDLINKS"
fi
# Check for directory "$PREFIX/$PREFIX" which almost always indicates
# packaging error.
if [ -d "./${TERMUX_PREFIX#/}" ]; then
termux_error_exit "Package contains directory \"\$PREFIX/\$PREFIX\" ($TERMUX_PREFIX/${TERMUX_PREFIX#/})"
fi
# Check so that package is not affected by
# https://github.com/android/ndk/issues/1614, or
# https://github.com/termux/termux-packages/issues/9944