aboutsummaryrefslogtreecommitdiff
path: root/bin/kbuild
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2025-10-07 10:15:04 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2025-10-07 10:15:04 +0200
commitb00ad9823a474b1b3ff3436dd7116b8229fb6215 (patch)
tree8a0b28e358cf382b0e09e9f4ec931e5ba83f5f80 /bin/kbuild
parent40b71a7255210cec100c7287e81b46f566edf927 (diff)
downloaddotfiles-b00ad9823a474b1b3ff3436dd7116b8229fb6215.tar.gz
dotfiles-b00ad9823a474b1b3ff3436dd7116b8229fb6215.zip
kbuild: Don't check on the profile before help
If the user asked for '-h/--help', the profile is irrelevant. Hence, the right order is: first check if '-h/--help' was provided, then the profile. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'bin/kbuild')
-rwxr-xr-xbin/kbuild28
1 files changed, 14 insertions, 14 deletions
diff --git a/bin/kbuild b/bin/kbuild
index 8064ac9..23cef35 100755
--- a/bin/kbuild
+++ b/bin/kbuild
@@ -85,20 +85,6 @@ while [[ $# -gt 0 ]]; do
esac
done
-# Hard check on the profile being picked.
-case "$PROFILE" in
- "vf2" | "suse")
- ;;
- "")
- echo "kbuild (error): you have to profile one of these profiles: vf2, suse."
- exit 1
- ;;
- *)
- echo "kbuild (error): uknown profile '$PROFILE'. Possible values: vf2, suse."
- exit 1
- ;;
-esac
-
# Print the show message if needed.
if [ -n "$SHOW_HELP" ]; then
cat <<HERE
@@ -115,6 +101,20 @@ HERE
exit 0
fi
+# Hard check on the profile being picked.
+case "$PROFILE" in
+ "vf2" | "suse")
+ ;;
+ "")
+ echo "kbuild (error): you have to profile one of these profiles: vf2, suse."
+ exit 1
+ ;;
+ *)
+ echo "kbuild (error): uknown profile '$PROFILE'. Possible values: vf2, suse."
+ exit 1
+ ;;
+esac
+
##
# Initial checks.