[beast/0.7.x: 1/2] mkrelease.sh: fixed 'commit-stamps' outside of git repos
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/0.7.x: 1/2] mkrelease.sh: fixed 'commit-stamps' outside of git repos
- Date: Fri, 10 Sep 2010 17:05:02 +0000 (UTC)
commit 98ed7f4da8a7c4425715bd359cf208e444f1aa73
Author: Tim Janik <timj gtk org>
Date: Fri Sep 10 18:56:41 2010 +0200
mkrelease.sh: fixed 'commit-stamps' outside of git repos
mkrelease.sh | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/mkrelease.sh b/mkrelease.sh
index 9678107..82dcfef 100755
--- a/mkrelease.sh
+++ b/mkrelease.sh
@@ -4,6 +4,7 @@
## This work is provided "as is"; see: http://rapicorn.org/LICENSE-AS-IS
MYVERSION="mkrelease.sh version 20100901"
+# 20100910: fixed 'commit-stamps' outside of git repos
# 20100901: check HEAD against upstream repository, upload last
# 20100831: implemented 'shellvar' command
# 20100827: implemented 'news' command
@@ -82,10 +83,11 @@ done
# === commit-stamps ===
[ "$COMMAND" = "commit-stamps" ] && {
# echo stamp files touched by commits
- ls "${GIT_DIR:-.git}/`git symbolic-ref -q HEAD || echo HEAD`" \
- "${GIT_DIR:-.git}/packed-refs" \
- "${GIT_DIR:-.git}/HEAD" \
- 2>/dev/null
+ [ -e "${GIT_DIR:-.git}" ] && \
+ ls "${GIT_DIR:-.git}/`git symbolic-ref -q HEAD || echo HEAD`" \
+ "${GIT_DIR:-.git}/packed-refs" \
+ "${GIT_DIR:-.git}/HEAD" \
+ 2>/dev/null
exit
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]