@@ -713,6 +713,24 @@ function unzipRemoteFile()
713713 fi
714714}
715715
716+ # ################
717+ # GIT UTILITIES #
718+ # ################
719+
720+ function getGitRepositoryNameFromCloneURL()
721+ {
722+ local -r cloneURL=" ${1} "
723+
724+ checkNonEmptyString " ${cloneURL} " ' undefined clone url'
725+
726+ if [[ " $( grep -F -o ' @' <<< " ${cloneURL}" ) " != ' ' ]]
727+ then
728+ awk -F ' /' ' { print $2 }' <<< " ${cloneURL}" | cut -d ' .' -f 1
729+ else
730+ awk -F ' /' ' { print $5 }' <<< " ${cloneURL}" | cut -d ' .' -f 1
731+ fi
732+ }
733+
716734# ###################
717735# NUMBER UTILITIES #
718736# ###################
@@ -1283,7 +1301,10 @@ function debug()
12831301{
12841302 local -r message=" ${1} "
12851303
1286- echo -e " \033[1;34m${message} \033[0m" 2>&1
1304+ if [[ " $( isEmptyString " ${message} " ) " = ' false' ]]
1305+ then
1306+ echo -e " \033[1;34m${message} \033[0m" 2>&1
1307+ fi
12871308}
12881309
12891310function deleteSpaces()
@@ -1330,7 +1351,10 @@ function error()
13301351{
13311352 local -r message=" ${1} "
13321353
1333- echo -e " \033[1;31m${message} \033[0m" 1>&2
1354+ if [[ " $( isEmptyString " ${message} " ) " = ' false' ]]
1355+ then
1356+ echo -e " \033[1;31m${message} \033[0m" 1>&2
1357+ fi
13341358}
13351359
13361360function escapeGrepSearchPattern()
@@ -1386,7 +1410,10 @@ function info()
13861410{
13871411 local -r message=" ${1} "
13881412
1389- echo -e " \033[1;36m${message} \033[0m" 2>&1
1413+ if [[ " $( isEmptyString " ${message} " ) " = ' false' ]]
1414+ then
1415+ echo -e " \033[1;36m${message} \033[0m" 2>&1
1416+ fi
13901417}
13911418
13921419function invertTrueFalseString()
@@ -1541,7 +1568,10 @@ function warn()
15411568{
15421569 local -r message=" ${1} "
15431570
1544- echo -e " \033[1;33m${message} \033[0m" 1>&2
1571+ if [[ " $( isEmptyString " ${message} " ) " = ' false' ]]
1572+ then
1573+ echo -e " \033[1;33m${message} \033[0m" 1>&2
1574+ fi
15451575}
15461576
15471577# ###################
0 commit comments