Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] meson: build Xe test documentation
Date: Tue, 14 Mar 2023 10:27:42 +0200	[thread overview]
Message-ID: <87lejz7n5t.fsf@intel.com> (raw)
In-Reply-To: <20230314065344.589589-1-mauro.chehab@linux.intel.com>

On Tue, 14 Mar 2023, Mauro Carvalho Chehab <mauro.chehab@linux.intel.com> wrote:
> diff --git a/scripts/gen_rst_index b/scripts/gen_rst_index
> new file mode 100755
> index 000000000000..0b9d677083d4
> --- /dev/null
> +++ b/scripts/gen_rst_index
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +
> +## Copyright (C) 2023    Intel Corporation                 ##
> +## Author: Mauro Carvalho Chehab <mchehab@kernel.org>      ##
> +##                                                         ##
> +## Small script to produce a ReST index file               ##
> +
> +#!/bin/bash -e

Hashbang only works on the first line.

BR,
Jani.



> +
> +if [ $# -lt 3 ]; then
> +	echo 'Usage: $0: <title> <files> <dest_dir>' >&2
> +	exit 1
> +fi
> +
> +title=$1
> +shift
> +
> +args=( "$@" )
> +
> +dest_dir=${args[${#args[@]}-1]}
> +unset args[${#args[@]}-1]
> +
> +if [ ! -d $dest_dir ]; then
> +	echo "Error: $dest_dir directory doesn't exist" >&2
> +	exit 1
> +fi
> +
> +dest_file="$dest_dir/index.rst"
> +
> +echo $title > "$dest_file"
> +len=${#title}
> +for i in $(seq 1 $len); do
> +	echo -n "=" >> "$dest_file"
> +done
> +echo >> "$dest_file"
> +echo >> "$dest_file"
> +
> +echo ".. toctree::" >> "$dest_file"
> +echo "   :maxdepth: 1" >> "$dest_file"
> +echo >> "$dest_file"
> +
> +for i in "${!args[@]}"; do
> +	echo "   ${args[$i]}" >> "$dest_file"
> +done
> diff --git a/scripts/meson.build b/scripts/meson.build
> index 342972e66078..ce12aa02e946 100644
> --- a/scripts/meson.build
> +++ b/scripts/meson.build
> @@ -11,3 +11,6 @@ if build_tests
>  		install_data(prog, install_dir : bindir, install_mode : 'r-xr-xr-x')
>  	endforeach
>  endif
> +
> +igt_doc_script = find_program('igt_doc.py')
> +gen_rst_index = find_program('gen_rst_index')

-- 
Jani Nikula, Intel Open Source Graphics Center


  parent reply	other threads:[~2023-03-14  8:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  6:53 [igt-dev] [PATCH i-g-t] meson: build Xe test documentation Mauro Carvalho Chehab
2023-03-14  7:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-03-14  8:27 ` Jani Nikula [this message]
2023-03-14 11:12   ` [igt-dev] [PATCH i-g-t] " Mauro Carvalho Chehab
2023-03-14  9:50 ` Petri Latvala
2023-03-14 11:09   ` Mauro Carvalho Chehab
2023-03-15 10:09 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lejz7n5t.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=mauro.chehab@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox