diff --git a/gitlab/functions.sh b/gitlab/functions.sh index a29876d1c053795567f146926b3ee8dcfd9d364c..b20e1151462099ec50a50c393b743e18f162f7cf 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -11,17 +11,17 @@ arch() { # Functions for coloring echo commands log_info() { - echo -e "\033[1;32m(`date +%T`) ${@}\033[0m" + echo -e "(`date +%T`) \033[1;34m${@}\033[0m" } log_warn() { - echo -e "\033[1;33m(`date +%T`) ${@}\033[0m" + echo -e "(`date +%T`) \033[1;35mWarning: ${@}\033[0m" } log_error() { - echo -e "\033[1;31m(`date +%T`) ${@}\033[0m" + echo -e "(`date +%T`) \033[1;31mError: ${@}\033[0m" } diff --git a/gitlab/install.sh b/gitlab/install.sh index 836ec6976ceeb258732194f7864c8c6e160983a8..157d57e0976e7c2dda97b5fa780cedcd1b4bd65f 100755 --- a/gitlab/install.sh +++ b/gitlab/install.sh @@ -9,15 +9,18 @@ if [ "${#}" -ne 1 ]; then exit 1 fi + # Functions for coloring echo commands log_info() { - echo -e "\033[1;32m(`date +%T`) ${@}\033[0m" + echo -e "(`date +%T`) \033[1;34m${@}\033[0m" } + 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 run_cmd() { log_info "$ ${@}" @@ -31,15 +34,18 @@ run_cmd() { fi } + get_script() { run_cmd curl --silent --output ${1}/${2} "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/${2}" } + get_exec() { get_script ${1} ${2} chmod 755 ${1}/${2} } + run_cmd mkdir -pv ${1} get_script ${1} functions.sh for stage in "build" "test" "wheels" "deploy"; do