woj-server/resource/runner/scripts/common.sh

18 lines
456 B
Bash
Raw Normal View History

2022-10-20 18:21:11 +08:00
#!/usr/bin/env bash
COLOR_RED="\e[0;31m"
COLOR_GREEN="\e[0;32m"
COLOR_YELLOW="\e[0;33m"
COLOR_NONE="\e[0m"
function log_info() { echo -e "${COLOR_GREEN}$*${COLOR_NONE}" 1>&2; }
function log_warn() { echo -e "${COLOR_YELLOW}$*${COLOR_NONE}" 1>&2; }
function log_error() { echo -e "${COLOR_RED}$*${COLOR_NONE}" 1>&2; }
2022-10-28 21:57:28 +08:00
# Docker or Podman
2023-08-11 18:54:00 +08:00
DOCKER="podman"
if [ "$USE_DOCKER" ]; then
log_error "docker is deprecated"
log_info "Use podman instead"
fi