[IMP] Launch script: Pretty output by using few colours.
This commit is contained in:
parent
c9b36bf736
commit
1307362b43
17
launch.sh
17
launch.sh
@ -21,13 +21,24 @@ GISSMO_DOCKER_NAME="gissmo"
|
||||
GISSMO_DIR="${PROJECT_DIR}/${GIT_DIR_NAME}"
|
||||
DOCKERFILE="${GISSMO_DIR}/${DOCKERFILE_NAME}"
|
||||
|
||||
## Miscellaneous
|
||||
COMMAND="$1"
|
||||
shift 1; ARGS="$@"
|
||||
|
||||
red=`tput setaf 9`
|
||||
green=`tput setaf 2`
|
||||
yellow=`tput setaf 3`
|
||||
blue=`tput setaf 4`
|
||||
violet=`tput setaf 5`
|
||||
cyan=`tput setaf 6`
|
||||
white=`tput setaf 7`
|
||||
reset=`tput sgr0` # No Color
|
||||
|
||||
|
||||
|
||||
# METHODS
|
||||
error_and_continue() {
|
||||
echo "ERROR: $1"
|
||||
echo "${red}ERROR${reset}: $1"
|
||||
}
|
||||
|
||||
error_and_quit() {
|
||||
@ -36,7 +47,7 @@ error_and_quit() {
|
||||
}
|
||||
|
||||
info() {
|
||||
echo "INFO: $1"
|
||||
echo "${yellow}INFO${reset}: $1"
|
||||
}
|
||||
|
||||
not_implemented() {
|
||||
@ -45,7 +56,7 @@ not_implemented() {
|
||||
|
||||
show_help() {
|
||||
echo "$PROGRAM [COMMAND]"
|
||||
echo -e " Where COMMAND is one of:"
|
||||
echo -e " Where ${green}COMMAND${reset} is one of:"
|
||||
echo -e " - create Create postgreSQL database volume and postgreSQL Docker container"
|
||||
echo -e " - init Create project directory as python virtual environment, fetch git repository and install Python dependancies"
|
||||
echo -e " - migrate Launch migration command: python manage.py migrate"
|
||||
|
Loading…
Reference in New Issue
Block a user