@@ -19,7 +19,7 @@ BASE_PROJECT="$(dirname "${RELATIVE_DIR}")"
1919# Outputs:
2020# Log a message as action.
2121# ######################################
22- function log::action {
22+ function log::action() {
2323 local disable_console_colors; disable_console_colors=$( env::get_or_empty " DISABLE_CONSOLE_COLORS" )
2424 if [ -z " ${disable_console_colors} " ]; then
2525 echo -e " \033[33m⇒\033[0m ${@ } "
@@ -37,7 +37,7 @@ function log::action {
3737# Outputs:
3838# Log a message as failure.
3939# ######################################
40- function log::failure {
40+ function log::failure() {
4141 local disable_console_colors; disable_console_colors=$( env::get_or_empty " DISABLE_CONSOLE_COLORS" )
4242 if [ -z " ${disable_console_colors} " ]; then
4343 echo -e " \033[31m✗\033[0m Failed to ${@ } " >&2
@@ -55,7 +55,7 @@ function log::failure {
5555# Outputs:
5656# Log a message as success.
5757# ######################################
58- function log::success {
58+ function log::success() {
5959 local disable_console_colors; disable_console_colors=$( env::get_or_empty " DISABLE_CONSOLE_COLORS" )
6060 if [ -z " ${disable_console_colors} " ]; then
6161 echo -e " \033[32m✓\033[0m Succeeded to ${@ } "
@@ -72,7 +72,7 @@ function log::success {
7272# 0 if the command is present.
7373# 1 otherwise.
7474# ######################################
75- function helper::commands_are_present {
75+ function helper::commands_are_present() {
7676 for cmd in " ${@ } " ; do
7777 if ! [ -x " $( command -v " ${cmd} " ) " ]; then
7878 helper::raise_error " locate command '${cmd} '"
@@ -87,7 +87,7 @@ function helper::commands_are_present {
8787# Returns:
8888# Always exit 1.
8989# ######################################
90- function helper::raise_error {
90+ function helper::raise_error() {
9191 log::failure " $@ "
9292 exit 1
9393}
@@ -102,7 +102,7 @@ function helper::raise_error {
102102# Returns:
103103# Exit status of the command executed.
104104# ######################################
105- function helper::exec {
105+ function helper::exec() {
106106 local silent_stdout; silent_stdout=$( env::get_or_empty " SILENT_STDOUT" )
107107 local silent_stderr; silent_stderr=$( env::get_or_empty " SILENT_STDERR" )
108108 local err_exit_ctx=$( shopt -o errexit)
@@ -136,7 +136,7 @@ function helper::exec {
136136# Returns:
137137# Exit status of the command executed.
138138# ######################################
139- function helper::try {
139+ function helper::try() {
140140 helper::exec ${@: 2}
141141 local status=$?
142142 if [ ${status} -eq 0 ]; then
@@ -163,7 +163,7 @@ function helper::try {
163163# 0 if the environment variable is present.
164164# 1 otherwise.
165165# ######################################
166- function env::get {
166+ function env::get() {
167167 local var; var=$( printf ' %s\n' " ${! 1} " )
168168 if [ -z " ${var} " ]; then
169169 helper::raise_error " retrieve environment '${1} ' variable"
@@ -179,7 +179,7 @@ function env::get {
179179# Outputs:
180180# Environment variable value or default value.
181181# ######################################
182- function env::get_or_default {
182+ function env::get_or_default() {
183183 local var; var=$( printf ' %s\n' " ${! 1} " )
184184 if [ -z " ${var} " ]; then
185185 echo -e " ${2} "
@@ -195,7 +195,7 @@ function env::get_or_default {
195195# Outputs:
196196# Environment variable value or empty value.
197197# ######################################
198- function env::get_or_empty {
198+ function env::get_or_empty() {
199199 env::get_or_default " ${1} " " "
200200}
201201
@@ -209,7 +209,7 @@ function env::get_or_empty {
209209# 0 if the environment variable is present or readed.
210210# 1 otherwise.
211211# ######################################
212- function env::get_or_read {
212+ function env::get_or_read() {
213213 local var; var=$( printf ' %s\n' " ${! 1} " )
214214 if [ -z " ${var} " ]; then
215215 read -p " Value for ${1} : ` echo $' \n > ' ` " var
@@ -222,7 +222,7 @@ function env::get_or_read {
222222# Outputs:
223223# Random char sequence containing alphanumeric.
224224# ######################################
225- function str::random {
225+ function str::random() {
226226 cat /dev/urandom | env LC_ALL=" C.UTF-8" LANG=" C.UTF-8" LC_CTYPE=" C" tr -dc ' a-z0-9' | fold -w 32 | head -n 1
227227}
228228
0 commit comments