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.
This commit is contained in:
parent
092a4ca14f
commit
4bfb5c8fc1
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue