All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [dim PATCH 1/4] dim: do not bail out if the script is not up-to-date
Date: Tue,  4 Apr 2017 16:58:59 +0300	[thread overview]
Message-ID: <1491314342-7122-1-git-send-email-jani.nikula@intel.com> (raw)

It's rather obnoxious to exit in the middle of something just because
you haven't updated the script. Only issue a warning.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 dim | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dim b/dim
index 33d5fd3c0303..8671bcb84845 100755
--- a/dim
+++ b/dim
@@ -289,18 +289,18 @@ function dim_uptodate
 
 	if [[ ! -e "$using" ]]; then
 		echoerr "could not figure out the version being used ($using)."
-		exit 1
+		return 1
 	fi
 
 	if [[ ! -e "$DIM_PREFIX/maintainer-tools/.git" ]]; then
 		echoerr "could not find the upstream repo for $dim."
-		exit 1
+		return 1
 	fi
 
 	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show "@{upstream}:dim" |\
 			diff "$using" - >& /dev/null; then
 		echoerr "not running upstream version of the script."
-		exit 1
+		return 1
 	fi
 }
 
@@ -334,7 +334,7 @@ function git_branch_exists # branch
 }
 
 if [[ "$(($(date +%s) % 100))" -eq "0" ]] ; then
-        dim_uptodate
+        dim_uptodate || true
 fi
 
 # get message id from file
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-04-04 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 13:58 Jani Nikula [this message]
2017-04-04 13:59 ` [dim PATCH 2/4] dim: move dim update check near the end Jani Nikula
2017-04-04 13:59 ` [dim PATCH 3/4] dim: move helper functions above command line options handling Jani Nikula
2017-04-04 13:59 ` [dim PATCH 4/4] dim: run executables in $PATH named dim-subcommand as dim subcommands Jani Nikula
2017-04-04 15:03   ` Daniel Vetter
2017-04-05  7:28     ` Jani Nikula
2017-04-05  9:12       ` Daniel Vetter

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=1491314342-7122-1-git-send-email-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --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.