]> pd.if.org Git - startuptools/commitdiff
use printf instead of echo in startup functions
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 10 Nov 2014 07:41:18 +0000 (07:41 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 10 Nov 2014 07:41:18 +0000 (07:41 +0000)
scripts/functions.rc

index 854a56735c3e1af787a09b41f95eeaf6ee2db962..16fcc6ee13b40322e2ad27aaa030743c87290cb4 100644 (file)
@@ -7,27 +7,27 @@ off=$(tput sgr0)
 fi
 
 status_msg() {
-       echo "\r[$1]"
+       printf "\r[$1]\n"
 }
 
 status_starting() {
-       echo -n "[      ] Starting $1"
+       printf "[      ] Starting $1"
 }
 
 status_begin() {
-       echo -n "[      ] $*"
+       printf "[      ] $*"
 }
 
 status_stopping() {
-       echo -n "[      ] Stopping $1"
+       printf "[      ] Stopping $1"
 }
 
 status_ok() {
-       echo    "\r[  ${green}OK$off  ]"
+       printf "\r[  ${green}OK${off}  ]\n"
 }
 
 status_fail() {
-       echo    "\r[FAILED]"
+       printf "\r[${red}FAILED${off}]\n"
 }
 
 status_check() {