From 96a254701d2c503bb052a8f2937f5b7c22ca01be Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 2 Feb 2018 09:55:00 +0100 Subject: bin/interpret-mail: copy-to-build-support new --- bin/interpret-mail | 14 ++++++++++++++ conf/default.conf | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bin/interpret-mail b/bin/interpret-mail index 08e0f16..1cc466e 100755 --- a/bin/interpret-mail +++ b/bin/interpret-mail @@ -23,6 +23,9 @@ if [ $# -ne 0 ]; then >&2 echo ' - "block: ":' >&2 echo ' Block the given packge for the given reason.' >&2 echo '' + >&2 echo ' - "copy-to-build-support: ":' + >&2 echo ' Copy the given binary package into [build-support].' + >&2 echo '' >&2 echo ' - "schedule: ":' >&2 echo ' Put the given package on the build list (again).' >&2 echo '' @@ -226,3 +229,14 @@ if [ -s "${tmp_dir}/schedule" ]; then sponge "${tmp_dir}/schedule" log 'Successfully (re)scheduled %s packages.\n' "$(wc -l < "${tmp_dir}/schedule")" fi + +if [ -s "${tmp_dir}/copy-to-build-support" ]; then + sed -i ' + /\.pkg\.tar\.xz$/!s/$/.pkg.tar.xz/ + ' "${tmp_dir}/copy-to-build-support" + if run_and_log_on_error "${base_dir}/bin/copy-to-build-support" "${tmp_dir}/copy-to-build-support"; then + log 'Successfully copied %s packages to [build-support].\n' "$(wc -l < "${tmp_dir}/copy-to-build-support")" + else + log 'There was an error while copying the packages to [build-support] - ignoring this message.\n' + fi +fi diff --git a/conf/default.conf b/conf/default.conf index 6ee991b..84c0e4f 100755 --- a/conf/default.conf +++ b/conf/default.conf @@ -35,7 +35,7 @@ repo_key='0xdeadbeef' package_key='0x15eebadc0de' # what can be done via the email interface -possible_email_actions='stabilize block unblock schedule' +possible_email_actions='stabilize block unblock schedule copy-to-build-support' # how many lines of email logs should be kept maximally max_mail_log_lines=10 -- cgit v1.2.3