Hi,

Am Fri, 30 Sep 2016 22:02:20 +0200
schrieb Jan-Tarek Butt <ta...@ring0.de>:

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

I think, the original author intended the following:
  grep -q '^Maintainer' "$CONTROL" || \

This should be easier to read and does not hide errors like "$CONTROL does not
exist".


btw: In the lines above, the following statement does not work in the way it
looks like, or?
  grep '^[^(Version|Architecture)]' "$CONTROL"
This "looks" like it schould remove all lines starting with "Version" or
"Architecture". But I think, in fact it removes all lines starting with any of
the characters within the square brackets above (e.g. "V", "e", "r", ...).
The following line should implement the intention of the author:
  grep -v "^\(Version\|Architecture\)"


Lars

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to