diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2025-10-07 10:15:04 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2025-10-07 10:15:04 +0200 |
| commit | b00ad9823a474b1b3ff3436dd7116b8229fb6215 (patch) | |
| tree | 8a0b28e358cf382b0e09e9f4ec931e5ba83f5f80 /bin/kbuild | |
| parent | 40b71a7255210cec100c7287e81b46f566edf927 (diff) | |
| download | dotfiles-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-x | bin/kbuild | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -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. |
