summaryrefslogtreecommitdiffstats
path: root/newapkbuild.in
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2016-06-20 11:11:12 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2016-06-20 11:15:42 +0200
commit4bfb5c8fc102b074545d5be174213df0177d21fd (patch)
treeaff54eeae9a5d92b06d982e2e375633aed9e9db9 /newapkbuild.in
parent092a4ca14f25daa7825738219fb09824264e8643 (diff)
downloadabuild-4bfb5c8fc102b074545d5be174213df0177d21fd.tar.bz2
abuild-4bfb5c8fc102b074545d5be174213df0177d21fd.tar.xz
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.
Diffstat (limited to 'newapkbuild.in')
-rw-r--r--newapkbuild.in2
1 files changed, 1 insertions, 1 deletions
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