mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
support/download: move tracing functions to helpers
errorN() was unused, drop it. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
2cbcc0f770
commit
e0fbfe3521
@@ -17,6 +17,9 @@
|
||||
# We want to catch any unexpected failure, and exit immediately.
|
||||
set -e
|
||||
|
||||
# shellcheck source=helpers source-path=SCRIPTDIR
|
||||
. "${0%/*}/helpers"
|
||||
|
||||
export BR_BACKEND_DL_GETOPTS=":hc:d:o:n:N:H:lru:qf:e"
|
||||
|
||||
main() {
|
||||
@@ -233,10 +236,5 @@ main() {
|
||||
return ${rc}
|
||||
}
|
||||
|
||||
trace() { local msg="${1}"; shift; printf "%s: ${msg}" "${my_name}" "${@}"; }
|
||||
warn() { trace "${@}" >&2; }
|
||||
errorN() { local ret="${1}"; shift; warn "${@}"; exit "${ret}"; }
|
||||
error() { errorN 1 "${@}"; }
|
||||
|
||||
my_name="${0##*/}"
|
||||
main "${@}"
|
||||
|
||||
@@ -94,5 +94,9 @@ post_process_repack() {
|
||||
mk_tar_gz "${in_dir}/${base_dir}" "${base_dir}" "${date}" "${out}"
|
||||
}
|
||||
|
||||
trace() { local msg="${1}"; shift; printf "%s: ${msg}" "${my_name}" "${@}"; }
|
||||
warn() { trace "${@}" >&2; }
|
||||
error() { warn "${@}"; exit 1; }
|
||||
|
||||
# Keep this line and the following as last lines in this file.
|
||||
# vim: ft=bash
|
||||
|
||||
Reference in New Issue
Block a user