mirror of
https://github.com/YunoHost/yunohost-ci.git
synced 2024-09-03 20:05:53 +02:00
create prints.sh
This commit is contained in:
parent
28993dbd04
commit
f52d24618c
4 changed files with 40 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
source $current_dir/prints.sh
|
||||||
source $current_dir/variables.sh # Get variables from variables.
|
source $current_dir/variables.sh # Get variables from variables.
|
||||||
|
|
||||||
info "Deleting container $CONTAINER_ID"
|
info "Deleting container $CONTAINER_ID"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
source $current_dir/base.sh # Get variables from base.
|
source $current_dir/prints.sh
|
||||||
source $current_dir/utils.sh # Get utils functions.
|
source $current_dir/utils.sh # Get utils functions.
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
37
prints.sh
Executable file
37
prints.sh
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
readonly NORMAL=$(printf '\033[0m')
|
||||||
|
readonly BOLD=$(printf '\033[1m')
|
||||||
|
readonly faint=$(printf '\033[2m')
|
||||||
|
readonly UNDERLINE=$(printf '\033[4m')
|
||||||
|
readonly NEGATIVE=$(printf '\033[7m')
|
||||||
|
readonly RED=$(printf '\033[31m')
|
||||||
|
readonly GREEN=$(printf '\033[32m')
|
||||||
|
readonly ORANGE=$(printf '\033[33m')
|
||||||
|
readonly BLUE=$(printf '\033[34m')
|
||||||
|
readonly YELLOW=$(printf '\033[93m')
|
||||||
|
readonly WHITE=$(printf '\033[39m')
|
||||||
|
|
||||||
|
function success()
|
||||||
|
{
|
||||||
|
local msg=${1}
|
||||||
|
echo "[${BOLD}${GREEN} OK ${NORMAL}] ${msg}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function info()
|
||||||
|
{
|
||||||
|
local msg=${1}
|
||||||
|
echo "[${BOLD}${BLUE}INFO${NORMAL}] ${msg}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function warn()
|
||||||
|
{
|
||||||
|
local msg=${1}
|
||||||
|
echo "[${BOLD}${ORANGE}WARN${NORMAL}] ${msg}" 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
function error()
|
||||||
|
{
|
||||||
|
local msg=${1}
|
||||||
|
echo "[${BOLD}${RED}FAIL${NORMAL}] ${msg}" 2>&1
|
||||||
|
}
|
1
utils.sh
1
utils.sh
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
source $current_dir/prints.sh
|
||||||
source $current_dir/variables.sh # Get variables from variables.
|
source $current_dir/variables.sh # Get variables from variables.
|
||||||
|
|
||||||
clean_containers()
|
clean_containers()
|
||||||
|
|
Loading…
Reference in a new issue