diff --git a/scripts/unpack b/scripts/unpack index ea95857afd..3dce2c42d2 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -4,14 +4,14 @@ # Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) -. config/options $1 +. config/options "$1" if [ -z "$1" ]; then die "usage: $0 package_name" fi -if [ ! -f $PKG_DIR/package.mk ]; then - die "$(print_color CLR_ERROR "$1: no package.mk file found")" +if [ -z "${PKG_NAME}" ]; then + die "$(print_color CLR_ERROR "${1}: no package.mk file found")" fi $SCRIPTS/get $1 @@ -44,15 +44,6 @@ fi if [ -d "$SOURCES/$1" -o -d "$PKG_DIR/sources" ]; then build_msg "CLR_UNPACK" "UNPACK" "${1}" "indent" - # unset functions - unset -f pre_unpack - unset -f unpack - unset -f post_unpack - unset -f pre_patch - unset -f post_patch - - . $PKG_DIR/package.mk - pkg_call_optional pre_unpack if ! pkg_call unpack; then