From bbed5ffcddcc3cf62060796baf679628687cef1d Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 6 Jul 2026 22:46:25 +0200 Subject: kbuild: properly state when no profiles are available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- bin/kbuild | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/kbuild b/bin/kbuild index 0d61ece..87f6869 100755 --- a/bin/kbuild +++ b/bin/kbuild @@ -52,7 +52,11 @@ KBUILD_CONFIG_PATH="$HOME/.config/kbuild" # Helper function to list the available profiles in the system. list_available_profiles() { dirs="$(find $KBUILD_CONFIG_PATH/ -mindepth 1 -maxdepth 1 -type d -printf '%P\n' | sort | awk '{printf "%s%s", (NR==1?"":", "), $0} END {print ""}')" - echo "kbuild (info): available profiles: $dirs." + if [ -z "$dirs" ]; then + echo "kbuild (info): there are no available profiles." + else + echo "kbuild (info): available profiles: $dirs." + fi } ## -- cgit v1.2.3