Exheredludis/paludis/repositories/e/ebuild/exheredrey-0/output/00-efixme.sh
Jacob Hrbek 846effdb14
Exheredrey: Initial commit
Signed-off-by: Jacob Hrbek <kreyren@rixotstudio.cz>
2020-10-21 17:15:50 +02:00

40 lines
1.4 KiB
Bash

#!/bin/sh
# shellcheck shell=sh # Written to comply with POXIS IEEE 1003.1-2017
efixme() { funcname="efixme"
: "Output function used to output annoying messages about unimplemented features
SYNOPSIS: ${FUNCNAME:-"$funcname"} [message]
The format string can be customized using apropriate variable export
returns fatal error if [message] is not provided
Written to comply with POXIS IEEE 1003.1-2017
Linted using shellcheck 0.7.1 (21.10.2020-EU)
Created by Jacob Hrbek identified using a GPG identifier assigned to the electronic mail <kreyren@rixotstudio.cz> according to the keyserver <https://openpgp.org> in 21/10/2020-EU 16:11:03 CEST under the Zernit License <https://git.dotya.ml/RXT0112/Zernit/LICENSE.md>"
# Allow silencing of the messages
[ -z "$EFIXME_DO_NOT_OUTPUT_MESSAGES" ] || return 0
message="$1"
# Process the $message
if [ -n "$message" ]; then
# FIXME-TRANSLATE
case "$LANG" in
en-*|*) ${PRINTF:-printf} "${EFIXME_FORMAT_STRING:-"FIXME: %s\\n"}" "$message"
esac
elif [ -z "$message" ]; then
# FIXME-TRANSLATE
case "$LANG" in
en-*|*) ${PRINTF:-printf} "${EFIXME_FORMAT_STRING_SYNERR:-"SYNTAX-FIXME(${FUNCNAME:-$funcname}): %s\\n"}" "Expected message was not provided in function '${FUNCNAME:-"$funcname"}'"
esac
# Terminate the script
${EXIT:-exit} "${EFIXME_EXIT_CODE_SYNERR:-111}"
else
die integrity
exit 255
fi
}