wazuh / wazuh-installation-assistant

Wazuh - Installation assistant
https://wazuh.com/
GNU General Public License v2.0
0 stars 3 forks source link

Add parameters validation to `builder.sh` script #24

Open davidcr01 opened 2 months ago

davidcr01 commented 2 months ago
Target version Related issue Related PR/dev branch
5.0.0 wazuh/wazuh-automation#1319

Description

Related: https://github.com/wazuh/wazuh-installation-assistant/issues/19

The builder.sh script builds the different scripts of the Wazuh installation assistant repository:

echo -e "DESCRIPTION"
echo -e "        -i,  --installer"
echo -e "                Builds the installation assistant (wazuh-install.sh)"
echo -e ""
echo -e "        -c,  --cert-tool"
echo -e "                Builds the certificate tool (wazuh-certs-tool.sh)"
echo -e ""
echo -e "        -d [pre-release|staging],  --development"
echo -e "                Use development repositories. By default it uses the pre-release package repository. If staging is specified, it will use that repository."
echo -e ""
echo -e "        -p,  --password-tool"
echo -e "                Builds the password tool (wazuh-passwords-tool.sh)"
echo -e ""
echo -e "        -h,  --help"
echo -e "                Shows help."

I have discovered that, if no parameter is passed to the builder.sh script, the script does not print the help (it does not perform any operation either).

➜  bash builder.sh 
➜   

[!IMPORTANT] It would be desirable that, if no argument is passed to this script, the help will be printed, in order to follow the script usage.