diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/kbuild | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 } ## |
