]> git.ipfire.org Git - people/arne_f/network.git/blobdiff - functions.util
network: Only jump to help if the --help parameter is the next parameter.
[people/arne_f/network.git] / functions.util
index 86d852c0b9d421ca7cf9a4c40420d70d3734b5fa..a953a27e0a472f398394f91e4c43e5bb616e070d 100644 (file)
@@ -21,7 +21,7 @@
 
 # Print a pretty error message
 function error() {
-       echo -e " ${FAIL}ERROR${NORMAL}  : $@" >&2
+       echo -e " ${COLOUR_ERROR}ERROR${COLOUR_NORMAL}  : $@" >&2
 }
 
 function error_log() {
@@ -31,7 +31,7 @@ function error_log() {
 
 # Print a pretty warn message
 function warning() {
-       echo -e " ${WARN}WARNING${NORMAL}: $@" >&2
+       echo -e " ${COLOUR_WARN}WARNING${COLOUR_NORMAL}: $@" >&2
 }
 
 function warning_log() {
@@ -229,3 +229,9 @@ function assert() {
 
        return ${EXIT_OK}
 }
+
+function uppercase() {
+       local input
+       read input
+       echo "${input^^}"
+}