From 2dc01a93b94d5bda83391534b3d49f24bbc1de9b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 16 Sep 2026 11:21:56 +0100 Subject: [PATCH] mk: tidy up xbmk_sanitize_version Signed-off-by: Leah Rowe --- include/lib.sh | 10 +++------- mk | 5 +++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/lib.sh b/include/lib.sh index b57b3418..63a82084 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -44,13 +44,9 @@ version() xbmk_sanitize_version() { - [ -z "$version" ] && \ - return 0 - - version="`printf '%s\n' "$version" | sed \ - 's/[[:space:]]//g; s/\.\.//g; s/\.\///g; s/\//-/g; s/^-//'`" - - [ -z "$version" ] && \ + [ -n "$version" ] && version="`printf '%s\n' "$version" | sed \ + 's/[[:space:]]//g; s/\.\.//g; s/\.\///g; s/\//-/g; s/^-//'`" \ + && [ -z "$version" ] && \ err "'version' empty after sanitization" \ "xbmk_sanitize_version" "$@"; : } diff --git a/mk b/mk index 0c30e6ab..51553a7c 100755 --- a/mk +++ b/mk @@ -216,7 +216,6 @@ multi_tree_build() target="${x##*/}" x_ handle_defconfig - $if_build \ x_ $postmake; : done; : @@ -337,8 +336,10 @@ build_dependencies() $if_not_dry_build \ err "$project/$tree: !bd '$bd'" \ "build_dependencies" "$@" + [ "${bd##*/}" = "$bd" ] && \ bd_tree="" + [ -n "$bd_project" ] && \ $if_not_dry_build \ x_ "$mk" -b $bd_project $bd_tree; : @@ -525,7 +526,7 @@ check_autoconf() [ -f "configure" ] && \ x_ ./configure $configureargs; : - ) || err "can't bootstrap project: $1" "check_autoconf" "$@"; : + ) || err "can't bootstrap project: $1" check_autoconf "$@"; : } check_makefile()