From c81efe884a55d589a1f92617073386e0d7d10e80 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Fri, 12 Mar 2021 02:39:53 +0000 Subject: [PATCH] scripts/unpack: remove use of dirname and basename Signed-off-by: Ian Leonard --- scripts/unpack | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/unpack b/scripts/unpack index 01bcf57038..b1bb4ada36 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -158,7 +158,7 @@ if [ -d "${SOURCES}/${PKG_NAME}" -o -d "${PKG_DIR}/sources" ] || pkg_call_exists ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${PKG_VERSION}/*.patch \ ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/*.patch; do - thisdir="$(dirname "${i}")" + thisdir="${i%/*}" if [ "${thisdir}" = "${PKG_DIR}/patches" ]; then PATCH_DESC="(common)" @@ -178,11 +178,11 @@ if [ -d "${SOURCES}/${PKG_NAME}" -o -d "${PKG_DIR}/sources" ] || pkg_call_exists PATCH_DESC="(device)" else if [[ "${thisdir}" =~ ^${PKG_DIR}/.* ]]; then - PATCH_DESC="(common - $(basename "${thisdir}"))" + PATCH_DESC="(common - ${thisdir##*/})" elif [[ "${thisdir}" =~ ^${PROJECT_DIR}/.*/devices/.* ]]; then - PATCH_DESC="(device - $(basename "${thisdir}"))" + PATCH_DESC="(device - ${thisdir##*/})" elif [[ "${thisdir}" =~ ^${PROJECT_DIR}/.* ]]; then - PATCH_DESC="(project - $(basename "${thisdir}"))" + PATCH_DESC="(project - ${thisdir##*/})" else PATCH_DESC="(absolute - ${i})" fi