From 4bfb5c8fc102b074545d5be174213df0177d21fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Mon, 20 Jun 2016 11:11:12 +0200 Subject: newapkbuild: redirect find(1) stderr to /dev/null If $sdir is not defined find writes an error message to stderr. For example when running: newapkbuild -n foo -a foo You will see a find error message because no source url was provided. This commit silences any find error message. An alternative solution would be to not invoke find unless $sdir is set. --- newapkbuild.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'newapkbuild.in') diff --git a/newapkbuild.in b/newapkbuild.in index d872bd3..54169cd 100644 --- a/newapkbuild.in +++ b/newapkbuild.in @@ -207,7 +207,7 @@ __EOF__ # Subpackage -dev is usually required only for C/C++. Since depends_dev # confuses a lot people, remove it if there's no .h or .hpp file. - find "$sdir" -name "*.h" -o -name "*.hpp" -maxdepth 3 \ + find "$sdir" -name "*.h" -o -name "*.hpp" -maxdepth 3 2>/dev/null \ | head -n 1 | grep -q ".*" \ || sed -i -e '/^depends_dev=.*/d' -e 's/\$depends_dev\s*//' APKBUILD -- cgit v1.2.3