Validate that no hard links exists in package
This commit is contained in:
parent
b09bf60c87
commit
46fe48b356
@ -961,6 +961,12 @@ termux_step_post_massage() {
|
||||
termux_step_create_datatar() {
|
||||
# Create data tarball containing files to package:
|
||||
cd "$TERMUX_PKG_MASSAGEDIR"
|
||||
|
||||
local HARDLINKS="$(find . -type f -links +1)"
|
||||
if [ -n "$HARDLINKS" ]; then
|
||||
termux_error_exit "Package contains hard links: $HARDLINKS"
|
||||
fi
|
||||
|
||||
if [ -z "${TERMUX_PKG_METAPACKAGE+x}" ] && [ "$(find . -type f)" = "" ]; then
|
||||
termux_error_exit "No files in package"
|
||||
fi
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd $HOME/termux
|
||||
|
||||
for f in * */subpackages/*; do
|
||||
cd $HOME/termux
|
||||
if [ -d $f/massage ]; then
|
||||
cd $f/massage
|
||||
if [ -n "$(find . -type f -links +1)" ]; then
|
||||
echo "$f contains hardlink, which will not work on Android 6 or later:"
|
||||
find . -type f -links +1
|
||||
fi
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user