From 4e88912ff032f1df77480ba37c82fb7049d1ff1b Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Fri, 29 Mar 2024 09:50:17 +0200 Subject: echo in dev.sh --- dev.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dev.sh b/dev.sh index c1fafd2..75f756a 100755 --- a/dev.sh +++ b/dev.sh @@ -1,6 +1,8 @@ #!/bin/sh -[ x$1 = x ] && echo "\ +ECHO="`which echo` -e" + +[ x$1 = x ] && $ECHO "\ Small script for running developement tools. Usage: $0 @@ -20,13 +22,13 @@ install Build poetry package and install it for current user PIP=`which pipx` [ x$PIP = x ] && PIP=`which pip` [ x$PIP = x ] \ - && echo "This scripts needs pipx or pip to install dependencies." \ + && $ECHO "This scripts needs pipx or pip to install dependencies." \ && exit 1 export DEVSH_PRIN=">>$DEVSH_PRIN" export DEVSH_PROUT="<<$DEVSH_PROUT" -echo "\033[32m$DEVSH_PRIN $0 $1 - started.\033[0m" +$ECHO "\033[32m$DEVSH_PRIN $0 $1 - started.\033[0m" case $1 in @@ -36,7 +38,7 @@ case $1 in install-latest-build) $PIP install `ls dist/*.tar.gz -t -c -1 | head -1` \ - && echo "For uninstall please use '$PIP uninstall ...'" + && $ECHO "For uninstall please use '$PIP uninstall ...'" ;; poetry-dev-deps) @@ -91,7 +93,7 @@ case $1 in ;; *) - echo "\033[31m$DEVSH_PROUT $0 $1 - unknown command.\033[0m" + $ECHO "\033[31m$DEVSH_PROUT $0 $1 - unknown command.\033[0m" exit 1 ;; esac @@ -99,7 +101,7 @@ esac STATUS=$? [ $STATUS != 0 ] \ - && echo "\033[31m$DEVSH_PROUT $0 $1 - exited with code $STATUS.\033[0m" \ + && $ECHO "\033[31m$DEVSH_PROUT $0 $1 - exited with code $STATUS.\033[0m" \ && exit $STATUS -echo "\033[32m$DEVSH_PROUT $0 $1 - done.\033[0m" +$ECHO "\033[32m$DEVSH_PROUT $0 $1 - done.\033[0m" -- cgit v1.2.3