From 1791646f584af47fe2eebd5ffb4b8d8f85e90e3f Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Wed, 27 Feb 2019 19:58:49 +0100 Subject: [PATCH] build-package: mv termux_step_create_datatar to scripts/build/ --- build-package.sh | 16 +--------------- scripts/build/termux_step_create_datatar.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 scripts/build/termux_step_create_datatar.sh diff --git a/build-package.sh b/build-package.sh index 695bbd663..59a775e9f 100755 --- a/build-package.sh +++ b/build-package.sh @@ -113,21 +113,7 @@ termux_step_post_massage() { } # Create data.tar.gz with files to package. Not to be overridden by package scripts. -termux_step_create_datatar() { - # Create data tarball containing files to package: - cd "$TERMUX_PKG_MASSAGEDIR" - - local HARDLINKS - 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 - tar -cJf "$TERMUX_PKG_PACKAGEDIR/data.tar.xz" . -} +source scripts/build/termux_step_create_datatar.sh termux_step_create_debscripts() { return diff --git a/scripts/build/termux_step_create_datatar.sh b/scripts/build/termux_step_create_datatar.sh new file mode 100644 index 000000000..756cb6e6a --- /dev/null +++ b/scripts/build/termux_step_create_datatar.sh @@ -0,0 +1,15 @@ +termux_step_create_datatar() { + # Create data tarball containing files to package: + cd "$TERMUX_PKG_MASSAGEDIR" + + local HARDLINKS + 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 + tar -cJf "$TERMUX_PKG_PACKAGEDIR/data.tar.xz" . +}