All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 03/10] dim: echoerr helper for printing to stderr
Date: Tue, 18 Oct 2016 16:05:59 +0300	[thread overview]
Message-ID: <87a8e1x0w8.fsf@intel.com> (raw)
In-Reply-To: <20161018121356.9594-3-daniel.vetter@ffwll.ch>

On Tue, 18 Oct 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  dim | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/dim b/dim
> index 192d6ee10838..2601bb7dbbad 100755
> --- a/dim
> +++ b/dim
> @@ -102,12 +102,17 @@ DRY=
>  FORCE=
>  HELP=
>  
> +function echoerr
> +{
> +	echo "$@" >&2
> +}

I guess you could move the "$dim: " prefix here, to ensure all places
will have that. Can be a follow-up.

BR,
Jani.

> +
>  function warn_or_fail
>  {
>  	if [[ $FORCE ]] ; then
> -		echo WARNING: $1, but continuing
> +		echoerr WARNING: $1, but continuing
>  	else
> -		echo ERROR: $1, aborting
> +		echoerr ERROR: $1, aborting
>  		exit 1
>  	fi
>  }
> @@ -128,7 +133,7 @@ while getopts hdfi opt; do
>  			HELP=1
>  			;;
>  		*)
> -			echo "See '$dim help' for more information." >&2
> +			echoerr "See '$dim help' for more information."
>  			exit
>  	esac
>  done
> @@ -167,18 +172,18 @@ function dim_uptodate
>  	local using="${BASH_SOURCE[0]}"
>  
>  	if [[ ! -e "$using" ]]; then
> -		echo "$dim: could not figure out the version being used ($using)." >&2
> +		echoerr "$dim: could not figure out the version being used ($using)."
>  		exit 1
>  	fi
>  
>  	if [[ ! -e "$DIM_PREFIX/maintainer-tools/.git" ]]; then
> -		echo "$dim: could not find the upstream repo for $dim." >&2
> +		echoerr "$dim: could not find the upstream repo for $dim."
>  		exit 1
>  	fi
>  
>  	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show @{upstream}:dim |\
>  			diff "$using" - >& /dev/null; then
> -		echo "$dim: not running upstream version of the script." >&2
> +		echoerr "$dim: not running upstream version of the script."
>  		exit 1
>  	fi
>  }
> @@ -1280,6 +1285,6 @@ subcmd_func=dim_${subcmd//-/_}
>  if declare -f $subcmd_func >/dev/null; then
>  	$subcmd_func "$@"
>  else
> -	echo "$dim: '$subcommand' is not a dim command." >&2
> +	echoerr "$dim: '$subcommand' is not a dim command."
>  	dim_usage
>  fi

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-10-18 13:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 12:13 [PATCH 01/10] dim: Extract TODO Daniel Vetter
2016-10-18 12:13 ` [PATCH 02/10] dim: Autocheck for up-to-dateness Daniel Vetter
2016-10-18 13:15   ` Jani Nikula
2016-10-18 13:27     ` Daniel Vetter
2016-10-18 14:04       ` Jani Nikula
2016-10-18 12:13 ` [PATCH 03/10] dim: echoerr helper for printing to stderr Daniel Vetter
2016-10-18 13:05   ` Jani Nikula [this message]
2016-10-18 12:13 ` [PATCH 04/10] dim: autodetect remotes, first part for dim_setup Daniel Vetter
2016-10-18 13:27   ` [Intel-gfx] " Jani Nikula
2016-10-18 13:30     ` Ville Syrjälä
2016-10-18 14:05       ` Jani Nikula
2016-10-18 19:38   ` [PATCH] dim: autodetect branches in rebuild-nightly Daniel Vetter
2016-10-18 12:13 ` [PATCH 05/10] dim: support git worktree for aux checkouts Daniel Vetter
2016-10-18 13:38   ` [Intel-gfx] " Jani Nikula
2016-10-18 19:11     ` Daniel Vetter
2016-10-18 12:13 ` [PATCH 06/10] dim: Nuke nightly-forget Daniel Vetter
2016-10-18 13:39   ` Jani Nikula
2016-10-18 19:18     ` Daniel Vetter
2016-10-18 12:13 ` [PATCH 07/10] dim: autodetect branches in rebuild-nightly Daniel Vetter
2016-10-18 13:52   ` Jani Nikula
2016-10-18 19:29     ` Daniel Vetter
2016-10-19  7:10       ` Jani Nikula
2016-10-18 12:13 ` [PATCH 08/10] dim: remove integration-tree remotes Daniel Vetter
2016-10-18 12:13 ` [PATCH 09/10] dim: Split out drm-nightly.git Daniel Vetter
2016-10-18 12:13 ` [PATCH 10/10] dim: s/drm-nightly/drm-tip Daniel Vetter
2016-10-18 13:13 ` [Intel-gfx] [PATCH 01/10] dim: Extract TODO Jani Nikula

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=87a8e1x0w8.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.