aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/kbuild6
1 files changed, 5 insertions, 1 deletions
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
}
##