From 020fe7122c156efc6d38eb4293acc6ddf650c2f4 Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Sat, 25 Jul 2020 01:46:30 +0200 Subject: [PATCH] stub --- .../downstream-classes/zeres-0/bash/UNLEASH.sh | 6 +++++- .../downstream-classes/zeres-0/bash/output/die.sh | 2 +- .../downstream-classes/zeres-0/bash/output/ebench.sh | 8 ++++---- .../downstream-classes/zeres-0/bash/output/edebug.sh | 6 +++--- .../downstream-classes/zeres-0/bash/output/eerror.sh | 6 +++--- .../downstream-classes/zeres-0/bash/output/efixme.sh | 10 +++++----- .../downstream-classes/zeres-0/bash/output/einfo.sh | 6 +++--- .../downstream-classes/zeres-0/bash/output/elog.sh | 6 +++--- .../downstream-classes/zeres-0/bash/output/ewarn.sh | 6 +++--- 9 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/UNLEASH.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/UNLEASH.sh index 3148fd9..aacc22f 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/UNLEASH.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/UNLEASH.sh @@ -44,12 +44,14 @@ # Maintainer info UPSTREAM="https://github.com/RXT0112/Zernit" +UPSTREAM_NAME="RiXotStudio" +UPSTREAM_EMAIL="rxt0112@rixotstudio.cz" MAINTAINER_EMAIL="kreyren@rixotstudio.cz" MAINTAINER_NICKNAME="kreyren" MAINTAINER_NAME="Jacob" MAINTAINER_SURNAME="Hrbek" -# FIXME: _=${var:="some text"} is less verbose and less error prone than [ -z "$var" ] && var="some text" +# FIXME-SUGGESTION: _=${var:="some text"} is less verbose and less error prone than [ -z "$var" ] && var="some text" # Command overrides ## These may be required on some systems @@ -121,6 +123,8 @@ MAINTAINER_SURNAME="Hrbek" # ebench [ -z "$EBENCH_FORMAT_STRING_START" ] && EBENCH_FORMAT_STRING="BENCHMARK: Starting benchmark for action %s\n" [ -z "$EBENCH_FORMAT_STRING_RESULT" ] && EBENCH_FORMAT_STRING="BENCHMARK: Action %s took $SECONDS seconds\n" +# invoke_privileged +[ -z "$INVOKE_PRIVILEGED_FORMAT_STRING_QUESTION" ] && INVOKE_PRIVILEGED_FORMAT_STRING_QUESTION="### PRIVILEGED ACCESS REQUEST ###\n\n\s\n" # Exit on anything unexpected set -e diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/die.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/die.sh index f550e50..38c258b 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/die.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/die.sh @@ -208,4 +208,4 @@ die() { funcname="die" unset funcname exit 255 esac -}; alias die='die "$LINENO"' +}; alias die='die "${LINENO:-0}"' diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ebench.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ebench.sh index d89848b..cf26c63 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ebench.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ebench.sh @@ -16,7 +16,7 @@ ebench() { funcname="ebench" case "$SKIP_BENCHMARK" in 1) unset funcname - exit 0 ;; + return 0 ;; 0|"") edebug 3 "Benchmark was not skipped" ;; *) die 23 "Variable SKIP_BENCHMARK has unexpected value '$SKIP_BENCHMARK', expecting only '1' or blank" esac @@ -28,11 +28,11 @@ ebench() { funcname="ebench" efixme "Variable 'SECONDS' is not POSIX compatible, implement logic" SECONDS=0 unset funcname - exit 0 ;; + return 0 ;; result) printf "$EBENCH_FORMAT_STRING_RESULT" "$2" || die invalid-format unset funcname - exit 0 ;; + return 0 ;; *) die 2 "Invalid argument '$2' has been parsed in $funcname" esac -}; alias ebench='ebench "$LINENO"' +}; alias ebench='ebench "${LINENO:-0}"' diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/edebug.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/edebug.sh index 7410073..8221f80 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/edebug.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/edebug.sh @@ -16,16 +16,16 @@ edebug() { funcname="edebug" "$PRINTF" "$EDEBUG_FORMAT_STRING" "$2" || die invalid-format "$PRINTF" "$EDEBUG_FORMAT_STRING_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 elif [ "$DEBUG" = 1 ]; then "$PRINTF" "$EDEBUG_FORMAT_STRING_DEBUG" "$2" || die invalid-format "$PRINTF" "$EDEBUG_FORMAT_STRING_DEBUG_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 else case "$LANG" in # FIXME-TRANSLATE: Translate to more languages en-*|*) die 255 "processing variable DEBUG with value '$DEBUG' in $funcname" esac fi -}; alias die='die "$LINENO"' +}; alias die='die "${LINENO:-0}"' diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/eerror.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/eerror.sh index 12f6d3b..39ce396 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/eerror.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/eerror.sh @@ -15,16 +15,16 @@ eerror() { funcname="eerror" "$PRINTF" "$EERROR_FORMAT_STRING" "$2" || die invalid-format "$PRINTF" "$EERROR_FORMAT_STRING_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 elif [ "$DEBUG" = 1 ]; then "$PRINTF" "$EERROR_FORMAT_STRING_DEBUG" "$2" || die invalid-format "$PRINTF" "$EERROR_FORMAT_STRING_DEBUG_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 else case "$LANG" in # FIXME-TRANSLATE: Translate to more languages en-*|*) die bug "processing variable DEBUG with value '$DEBUG' in $funcname" esac fi -}; alias eerror='eerror "$LINENO"' +}; alias eerror='eerror "${LINENO:-0}"' diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/efixme.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/efixme.sh index 14f7380..4210904 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/efixme.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/efixme.sh @@ -26,18 +26,18 @@ efixme() { funcname="efixme" if [ "$IGNORE_FIXME" = 1 ]; then # FIXME: Implement 'fixme' debug channel edebug fixme "Fixme message for '$2' disabled" - exit 0 + return 0 elif [ "$IGNORE_FIXME" = 0 ] || [ -z "$IGNORE_FIXME" ]; then if [ "$DEBUG" = 0 ] || [ -z "$DEBUG" ]; then "$PRINTF" "$EFIXME_FORMAT_STRING" "$2" || die invalid-format - "$PRINTF" "$EFIXME_FORMAT_STRING" "$2" >> "$logPath" || die invalid-format + "$PRINTF" "$EFIXME_FORMAT_STRING_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 elif [ "$DEBUG" = 1 ]; then "$PRINTF" "$EFIXME_FORMAT_STRING_DEBUG" "$2" || die invalid-format "$PRINTF" "$EFIXME_FORMAT_STRING_DEBUG_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 else case "$LANG" in # FIXME-TRANSLATE: Translate to more languages @@ -50,4 +50,4 @@ efixme() { funcname="efixme" en-*|*) die 255 "processing variable IGNORE_FIXME with value '$IGNORE_FIXME' in $0" esac fi -}; alias efixme='efixme "$LINENO"' +}; alias efixme='efixme "${LINENO:-0}"' diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/einfo.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/einfo.sh index 5383b2b..b2b4bcf 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/einfo.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/einfo.sh @@ -14,16 +14,16 @@ einfo() { funcname="einfo" "$PRINTF" "$EINFO_FORMAT_STRING" "$1" || die invalid-format "$PRINTF" "$EINFO_FORMAT_STRING_LOG" "$1" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 elif [ "$DEBUG" = 1 ]; then "$PRINTF" "$EINFO_FORMAT_STRING_DEBUG" "$1" || die invalid-format "$PRINTF" "$EINFO_FORMAT_STRING_DEBUG_LOG" "$1" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 else case "$LANG" in # FIXME-TRANSLATE: Translate to more languages en-*|*) die bug "processing variable DEBUG with value '$DEBUG' in $funcname" esac fi -}; alias einfo='einfo "$LINENO"' +}; alias einfo='einfo "${LINENO:-0}"' diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/elog.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/elog.sh index 867b26c..51e3075 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/elog.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/elog.sh @@ -14,11 +14,11 @@ elog() { funcname="elog" "debug") if [ "$DEBUG" = 0 ] || [ -z "$DEBUG" ]; then unset funcname - exit 0 + return 0 elif [ "$DEBUG" = 1 ]; then "$PRINTF" "$ELOG_FORMAT_STRING_DEBUG_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 else case "$LANG" in # FIXME-TRANSLATE: Translate to more languages @@ -27,4 +27,4 @@ elog() { funcname="elog" fi ;; *) die bug "Invalid argument '$2' has been parsed to $funcname" esac -}; alias einfo='einfo "$LINENO"' +}; alias einfo='einfo "${LINENO:-0}"' diff --git a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ewarn.sh b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ewarn.sh index cfa8d62..80fbb05 100644 --- a/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ewarn.sh +++ b/src/RXT0112-1/downstream-classes/zeres-0/bash/output/ewarn.sh @@ -14,16 +14,16 @@ ewarn() { funcname="ewarn" "$PRINTF" "$EWARN_FORMAT_STRING" "$2" || die invalid-format "$PRINTF" "$EWARN_FORMAT_STRING_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 elif [ "$DEBUG" = 1 ]; then "$PRINTF" "$EWARN_FORMAT_STRING_DEBUG" "$2" || die invalid-format "$PRINTF" "$EWARN_FORMAT_STRING_DEBUG_LOG" "$2" >> "$logPath" || die invalid-format unset funcname - exit 0 + return 0 else case "$LANG" in # FIXME-TRANSLATE: Translate to more languages en-*|*) die bug "processing variable DEBUG with value '$DEBUG' in $funcname" esac fi -}; alias ewarn='ewarn "$LINENO"' +}; alias ewarn='ewarn "${LINENO:-0}"'