2019-02-27 19:58:49 +01:00
|
|
|
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
|
|
|
|
|
2019-08-14 19:29:58 +02:00
|
|
|
if [ "$TERMUX_PKG_METAPACKAGE" = "true" ]; then
|
2019-08-13 00:59:25 +02:00
|
|
|
# Metapackage doesn't have data inside.
|
|
|
|
rm -rf data
|
|
|
|
else
|
|
|
|
if [ "$(find . -type f)" = "" ]; then
|
|
|
|
termux_error_exit "No files in package"
|
|
|
|
fi
|
2019-02-27 19:58:49 +01:00
|
|
|
fi
|
2019-08-13 00:59:25 +02:00
|
|
|
|
2019-02-27 19:58:49 +01:00
|
|
|
tar -cJf "$TERMUX_PKG_PACKAGEDIR/data.tar.xz" .
|
|
|
|
}
|