From 45e7f08ab436087414ba10c862d5f8a59b516d03 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 26 Feb 2018 09:00:53 +0100 Subject: lib/common-functions: save log of executed scripts - for debugging mysterious errors :-) --- conf/default.conf | 4 ++-- lib/common-functions | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/conf/default.conf b/conf/default.conf index 18f5d73..7e7ed3d 100755 --- a/conf/default.conf +++ b/conf/default.conf @@ -14,13 +14,13 @@ else base_dir=$(printf '%s/..' "$(dirname "$(readlink -f "$0")")") fi +work_dir="${base_dir}/work" + # shellcheck source=lib/common-functions . "${base_dir}/lib/common-functions" # shellcheck source=lib/mysql-functions . "${base_dir}/lib/mysql-functions" -work_dir="${base_dir}/work" - repo_names='packages community archlinux32' repo_paths__packages="${work_dir}/repos/packages" repo_paths__community="${work_dir}/repos/community" diff --git a/lib/common-functions b/lib/common-functions index a84271b..80f252c 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -15,6 +15,15 @@ if [ -z "${base_dir}" ]; then . 'conf/default.conf' fi +{ + printf 'sourcing common-functions for %s\n' "$0" + printf '%s parameters:' "$#" + printf ' "%s"' "$@" + printf '\n' +} >> \ + "${work_dir}/command-log" + + # find_pkgbuilds package repository git_repository git_revision mod_git_revision # find the PKGBUILD and modification of $package from $repository # sets $PKGBUILD and $PKGBUILD_mod -- cgit v1.2.3-70-g09d2