From: Fredrik Fornwall Date: Tue, 7 Mar 2017 00:44:53 +0000 (+0100) Subject: Validate that no hard links exists in package X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/commitdiff_plain/46fe48b356f4a46be344cb1633b0dcd05022a01c?hp=b09bf60c8732826eab7ef68ca25c2561dba3a3d1 Validate that no hard links exists in package --- diff --git a/build-package.sh b/build-package.sh index 7281c5f4..c6d768cc 100755 --- a/build-package.sh +++ b/build-package.sh @@ -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 diff --git a/scripts/detect-hardlinks.sh b/scripts/detect-hardlinks.sh deleted file mode 100755 index 207e4060..00000000 --- a/scripts/detect-hardlinks.sh +++ /dev/null @@ -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