From d0d28ee0a7230e3ca1dc2df0ab2b453b21ba2b7c Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 28 Nov 2018 15:38:24 +0000 Subject: [PATCH] scripts/unpack: use pkg_call --- scripts/unpack | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/scripts/unpack b/scripts/unpack index 83df55c0ef..ea95857afd 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -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