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

View file

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