0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-27 06:18:57 +00:00
termux-packages/scripts/build/termux_step_finish_build.sh
Henrik Grimler 924b664573
scripts: also add built subpkgs to $TERMUX_BUILT_PACKAGES_DIRECTORY
Otherwise a package with subpackages might be built many times if
packages that depend on a it, or its subpackages, are modified.
2022-08-09 11:15:30 +02:00

14 lines
517 B
Bash

termux_step_finish_build() {
echo "termux - build of '$TERMUX_PKG_NAME' done"
test -t 1 && printf "\033]0;%s - DONE\007" "$TERMUX_PKG_NAME"
mkdir -p "$TERMUX_BUILT_PACKAGES_DIRECTORY"
echo "$TERMUX_PKG_FULLVERSION" > "$TERMUX_BUILT_PACKAGES_DIRECTORY/$TERMUX_PKG_NAME"
for subpackage in "$TERMUX_PKG_BUILDER_DIR"/*.subpackage.sh; do
local subpkg_name="$(basename $subpackage | sed 's@\.subpackage\.sh@@g')"
echo "$TERMUX_PKG_FULLVERSION" > "$TERMUX_BUILT_PACKAGES_DIRECTORY/${subpkg_name}"
done
exit 0
}