Commit 4bfb5c8f authored by Sören Tempel's avatar Sören Tempel

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.
parent 092a4ca1
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment