scripts/unpack: use pkg_call

This commit is contained in:
MilhouseVH 2018-11-28 15:38:24 +00:00
parent 9959b29df9
commit d0d28ee0a7

View File

@ -53,13 +53,9 @@ if [ -d "$SOURCES/$1" -o -d "$PKG_DIR/sources" ]; then
. $PKG_DIR/package.mk
if [ "$(type -t pre_unpack)" = "function" ]; then
pre_unpack
fi
pkg_call_optional pre_unpack
if [ "$(type -t unpack)" = "function" ]; then
unpack
else
if ! pkg_call unpack; then
if [ -n "$PKG_URL" ]; then
$SCRIPTS/extract $1 $BUILD
fi
@ -82,14 +78,10 @@ if [ -d "$SOURCES/$1" -o -d "$PKG_DIR/sources" ]; then
mkdir -p "${PKG_BUILD}"
fi
if [ "$(type -t post_unpack)" = "function" ]; then
post_unpack
fi
pkg_call_optional post_unpack
if [ "${PKG_SKIP_PATCHES}" != "yes" ]; then
if [ "$(type -t pre_patch)" = "function" ]; then
pre_patch
fi
pkg_call_optional pre_patch
if [ "$TARGET_ARCH" = "x86_64" ]; then
PATCH_ARCH="x86"
@ -158,9 +150,7 @@ if [ -d "$SOURCES/$1" -o -d "$PKG_DIR/sources" ]; then
fi
done
if [ "$(type -t post_patch)" = "function" ]; then
post_patch
fi
pkg_call_optional post_patch
fi
if [ ! "$PKG_NAME" = "configtools" ] ; then