nomad_smartrestart: missing -e for echo

This commit is contained in:
Starbeamrainbowlabs 2020-09-05 19:25:35 +01:00
parent fd4074798e
commit 1dd5454824
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 5 additions and 3 deletions

View File

@ -19,7 +19,7 @@ if [[ -z "${NO_COLOR}" ]]; then
fi fi
help() { help() {
echo "nomad_smartrestart, v0.1 echo -e "nomad_smartrestart, v0.1
By Starbeamrainbowlabs By Starbeamrainbowlabs
${FBLE}${HC}USAGE${RS} ${FBLE}${HC}USAGE${RS}
@ -30,19 +30,21 @@ ${FBLE}${HC}ENVIRONMENT VARIABLES${RS}
} }
log_msg() { log_msg() {
echo "${HC}>>> nomad_smartrestart: ${RS}$*" >&2; echo -e "${HC}>>> nomad_smartrestart: ${RS}$*" >&2;
} }
log_error() { log_error() {
echo "${HC}>>> nomad_smartrestart: ${FRED}$*${RS}"; echo -e "${HC}>>> nomad_smartrestart: ${FRED}$*${RS}";
} }
if [[ -z "${imagename}" ]]; then if [[ -z "${imagename}" ]]; then
log_error "Error: No image name specified." >&2; log_error "Error: No image name specified." >&2;
help;
exit 1; exit 1;
fi fi
if [[ ! -f "./images/${imagename}/nomad.txt" ]]; then if [[ ! -f "./images/${imagename}/nomad.txt" ]]; then
log_msg "No nomad.txt present for ${HC}${FGRN}${imagename}${RS}, nothing to do"; log_msg "No nomad.txt present for ${HC}${FGRN}${imagename}${RS}, nothing to do";
help
exit 0; exit 0;
fi fi