Skip to content
Snippets Groups Projects
Commit 828771be authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Update coloring

parent cca852b2
No related branches found
No related tags found
No related merge requests found
...@@ -11,17 +11,17 @@ arch() { ...@@ -11,17 +11,17 @@ arch() {
# Functions for coloring echo commands # Functions for coloring echo commands
log_info() { log_info() {
echo -e "\033[1;32m(`date +%T`) ${@}\033[0m" echo -e "(`date +%T`) \033[1;34m${@}\033[0m"
} }
log_warn() { log_warn() {
echo -e "\033[1;33m(`date +%T`) ${@}\033[0m" echo -e "(`date +%T`) \033[1;35mWarning: ${@}\033[0m"
} }
log_error() { log_error() {
echo -e "\033[1;31m(`date +%T`) ${@}\033[0m" echo -e "(`date +%T`) \033[1;31mError: ${@}\033[0m"
} }
......
...@@ -9,15 +9,18 @@ if [ "${#}" -ne 1 ]; then ...@@ -9,15 +9,18 @@ if [ "${#}" -ne 1 ]; then
exit 1 exit 1
fi fi
# Functions for coloring echo commands # Functions for coloring echo commands
log_info() { log_info() {
echo -e "\033[1;32m(`date +%T`) ${@}\033[0m" echo -e "(`date +%T`) \033[1;34m${@}\033[0m"
} }
log_error() { log_error() {
echo -e "\033[1;31m(`date +%T`) ${@}\033[0m" echo -e "(`date +%T`) \033[1;31mError: ${@}\033[0m"
} }
# Function for running command and echoing results # Function for running command and echoing results
run_cmd() { run_cmd() {
log_info "$ ${@}" log_info "$ ${@}"
...@@ -31,15 +34,18 @@ run_cmd() { ...@@ -31,15 +34,18 @@ run_cmd() {
fi fi
} }
get_script() { get_script() {
run_cmd curl --silent --output ${1}/${2} "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}" run_cmd curl --silent --output ${1}/${2} "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}"
} }
get_exec() { get_exec() {
get_script ${1} ${2} get_script ${1} ${2}
chmod 755 ${1}/${2} chmod 755 ${1}/${2}
} }
run_cmd mkdir -pv ${1} run_cmd mkdir -pv ${1}
get_script ${1} functions.sh get_script ${1} functions.sh
for stage in "build" "test" "wheels" "deploy"; do for stage in "build" "test" "wheels" "deploy"; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment