mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 16:52:12 +02:00
added a new function to display the help usage
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
|
function display_help() {
|
||||||
|
first_playbook_found="$(find ansible -maxdepth 1 -type f -name '*.yml' | head -1 )"
|
||||||
|
|
||||||
|
echo "Example usage for interactive mode:"
|
||||||
|
echo " bash $0"
|
||||||
|
echo "Example usage for non-interactive mode:"
|
||||||
|
echo " bash $0 $first_playbook_found"
|
||||||
|
}
|
||||||
|
|
||||||
ERROR_BECAUSE_ROOT=1
|
ERROR_BECAUSE_ROOT=1
|
||||||
ERROR_BECAUSE_NOT_ARCH_LINUX=2
|
ERROR_BECAUSE_NOT_ARCH_LINUX=2
|
||||||
ERROR_BECAUSE_TOO_MUCH_ARGUMENTS_PROVDED=3
|
ERROR_BECAUSE_TOO_MUCH_ARGUMENTS_PROVDED=3
|
||||||
|
|||||||
Reference in New Issue
Block a user