diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-29 09:50:17 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-29 09:50:17 +0200 |
commit | 4e88912ff032f1df77480ba37c82fb7049d1ff1b (patch) | |
tree | d7f39e1699c358ff5b006437d4a849ca105cf2d3 /dev.sh | |
parent | 9e60c8dd2a3c8d27d02d1e7a019c55f23c6831c6 (diff) |
echo in dev.sh
Diffstat (limited to 'dev.sh')
-rwxr-xr-x | dev.sh | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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 <command> @@ -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" |