From 32a5f60bfe859e9d09013fd9809f183a393f676a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 27 Jun 2018 20:31:44 +0200 Subject: bin/copy-to-build-support: exit normally on no-matches --- bin/copy-to-build-support | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin/copy-to-build-support') diff --git a/bin/copy-to-build-support b/bin/copy-to-build-support index 8625d21..8388675 100755 --- a/bin/copy-to-build-support +++ b/bin/copy-to-build-support @@ -144,6 +144,14 @@ sed -n ' "${tmp_dir}/mysql-command" done +if [ ! -s "${tmp_dir}/repo-archs" ]; then + >&2 echo 'Nothing to do.' + if [ -w "$1" ]; then + printf '' > "$1" + fi + exit 0 +fi + sort -u "${tmp_dir}/repo-archs" | \ sponge "${tmp_dir}/repo-archs" -- cgit v1.2.3-70-g09d2