[LEDE-DEV] [PATCH v3 06/13] scripts: redirect matters, the 2>&1 has to be last

Jan-Tarek Butt tarek at ring0.de
Thu Oct 6 01:50:33 PDT 2016


Signed-off-by: Jan-Tarek Butt <tarek at ring0.de>
---
 scripts/make-ipkg-dir.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/make-ipkg-dir.sh b/scripts/make-ipkg-dir.sh
index 529e430..ba1a8df 100755
--- a/scripts/make-ipkg-dir.sh
+++ b/scripts/make-ipkg-dir.sh
@@ -8,10 +8,10 @@ ARCH=$4
 WD=$(pwd)
 
 mkdir -p "$TARGET/CONTROL"
-grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control"
-grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \
+grep -v "^\(Version\|Architecture\)" "$CONTROL" > "$TARGET/CONTROL/control"
+grep -q '^Maintainer' "$CONTROL" || \
         echo "Maintainer: LEDE Community <lede-dev at lists.infradead.org>" >> "$TARGET/CONTROL/control"
-grep '^Source' "$CONTROL" 2>&1 >/dev/null || {
+grep -q '^Source' "$CONTROL" || {
         pkgbase=$(echo "$WD" | sed -e "s|^$TOPDIR/||g")
         [ "$pkgbase" = "$WD" ] && src="N/A" || src="$BASE/$pkgbase"
         echo "Source: $src" >> "$TARGET/CONTROL/control"
-- 
2.10.0




More information about the Lede-dev mailing list