[cairo] [PATCH] check-doc-syntax: Don't hardcode path to awk

Bryce W. Harrington b.harrington at samsung.com
Sun Sep 15 21:57:33 PDT 2013


On Sun, Sep 15, 2013 at 05:02:13PM +0200, Uli Schlachter wrote:
> Instead of expecting awk in /usr/bin, this commit changes the code to call awk
> through a shell so that $PATH is searched.
> 
> Since this awk script shouldn't really be called manually, this is done by
> removing the shebang from the awk script, marking it non-executable and fixing
> up the caller.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67674
> Signed-off-by: Uli Schlachter <psychon at znc.in>

Reviewed-by: Bryce Harrington <b.harrington at samsung.com>

> ---
>  src/check-doc-syntax.awk | 2 --
>  src/check-doc-syntax.sh  | 2 +-
>  2 files changed, 1 insertion(+), 3 deletions(-)
>  mode change 100755 => 100644 src/check-doc-syntax.awk
> 
> diff --git a/src/check-doc-syntax.awk b/src/check-doc-syntax.awk
> old mode 100755
> new mode 100644
> index 5fdabda..1fa8b8d
> --- a/src/check-doc-syntax.awk
> +++ b/src/check-doc-syntax.awk
> @@ -1,5 +1,3 @@
> -#!/usr/bin/awk -f
> -
>  BEGIN {
>      name_found = 1
>      SECTION_DOC = 0
> diff --git a/src/check-doc-syntax.sh b/src/check-doc-syntax.sh
> index c74fb87..762a484 100755
> --- a/src/check-doc-syntax.sh
> +++ b/src/check-doc-syntax.sh
> @@ -72,7 +72,7 @@ fi >&2
> 
>  # Only run the syntax checker on the source files (not doc/)
>  if test -e ./check-doc-syntax.awk; then
> -    if echo $FILES | xargs ./check-doc-syntax.awk ; then
> +    if echo $FILES | xargs awk -f ./check-doc-syntax.awk ; then
>  	    :
>      else
>  	    stat=1
> -- 
> 1.8.4.rc3
> 
> -- 
> - Captain, I think I should tell you I've never
>   actually landed a starship before.
> - That's all right, Lieutenant, neither have I.
> -- 
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list