From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: files/hooks/
Date: Tue, 1 Apr 2014 16:38:48 +0000 (UTC) [thread overview]
Message-ID: <1396280235.5b39452838f97dd3645fb102a8f784639209ef1b.dywi@gentoo> (raw)
commit: 5b39452838f97dd3645fb102a8f784639209ef1b
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Mar 31 15:37:15 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Mar 31 15:37:15 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=5b394528
hooks: use die_cannot_run()
---
files/hooks/create-metadata-cache.sh | 4 ++--
files/hooks/git-commit-overlay.sh | 2 +-
files/hooks/git-push.sh | 2 ++
files/hooks/notify-desktop.sh | 2 ++
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/files/hooks/create-metadata-cache.sh b/files/hooks/create-metadata-cache.sh
index 808f537..a406d7f 100644
--- a/files/hooks/create-metadata-cache.sh
+++ b/files/hooks/create-metadata-cache.sh
@@ -14,10 +14,10 @@ set -u
#$lf ...
: ${EGENCACHE:=egencache}
-#autodie qwhich "${EGENCACHE}"
+qwhich "${EGENCACHE}" || die_cannot_run "egencache is not available."
# a valid PORTDIR is required
-[ -d "${PORTDIR-}" ] || die "\$PORTDIR '${PORTDIR-}' does not exist."
+[ -d "${PORTDIR-}" ] || die_cannot_run "\$PORTDIR '${PORTDIR-}' does not exist."
# void cleanup()
#
diff --git a/files/hooks/git-commit-overlay.sh b/files/hooks/git-commit-overlay.sh
index 2e726fb..30aad1c 100644
--- a/files/hooks/git-commit-overlay.sh
+++ b/files/hooks/git-commit-overlay.sh
@@ -17,7 +17,7 @@ set -u
## load git helper functions
$lf git
-#autodie qwhich ${GIT}
+qwhich "${GIT}" || die_cannot_run "git is not available."
## functions
diff --git a/files/hooks/git-push.sh b/files/hooks/git-push.sh
index 7d79e64..d5a410a 100644
--- a/files/hooks/git-push.sh
+++ b/files/hooks/git-push.sh
@@ -13,6 +13,8 @@ set -u
# using line_iterator() from itertools
$lf git itertools
+qwhich "${GIT}" || die_cannot_run "git is not available."
+
## functions
diff --git a/files/hooks/notify-desktop.sh b/files/hooks/notify-desktop.sh
index 9184c2f..32ae230 100644
--- a/files/hooks/notify-desktop.sh
+++ b/files/hooks/notify-desktop.sh
@@ -9,6 +9,8 @@ set -u
. "${FUNCTIONS?}" || exit
#dont_run_as_root
+qwhich notify-send || die_cannot_run "notify-send is not available."
+
## load helper functions
#$lf ...
next reply other threads:[~2014-04-01 16:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 16:38 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-01-25 18:14 [gentoo-commits] proj/R_overlay:master commit in: files/hooks/ André Erdmann
2013-09-23 15:30 André Erdmann
2013-09-06 11:10 André Erdmann
2013-09-06 11:10 André Erdmann
2013-09-06 10:22 André Erdmann
2013-09-06 10:22 André Erdmann
2013-09-06 10:22 André Erdmann
2013-09-04 13:13 André Erdmann
2013-09-04 12:50 André Erdmann
2013-09-04 10:16 André Erdmann
2013-08-02 10:34 André Erdmann
2013-06-22 15:24 André Erdmann
2013-06-22 15:24 André Erdmann
2013-06-21 18:41 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-22 15:24 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
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=1396280235.5b39452838f97dd3645fb102a8f784639209ef1b.dywi@gentoo \
--to=dywi@mailerd.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox