summaryrefslogtreecommitdiff
path: root/scripts/genCommitLog
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
committerOllivier Robert <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
commit2b45e011ca352ce509bc83ae148230aeee0c7e0d (patch)
treea618007bb41d13153794a598e3d904ace2976324 /scripts/genCommitLog
parent9b5bd0a264b0a21eefac2b929b574c73bd601507 (diff)
Diffstat (limited to 'scripts/genCommitLog')
-rwxr-xr-xscripts/genCommitLog13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/genCommitLog b/scripts/genCommitLog
index 2a258add4301..318e2866a47d 100755
--- a/scripts/genCommitLog
+++ b/scripts/genCommitLog
@@ -2,6 +2,15 @@
set -e
-. packageinfo.sh
-bk -R prs -hr${CLTAG}.. -nd':I:' | bk changes -m -v - > CommitLog.new
+GCL_REMOVEWRITE=0
+. ./packageinfo.sh
+if [ ! -w . ] ; then
+ GCL_REMOVEWRITE=1
+ chmod u+w .
+ [ -f CommitLog -a ! -w CommitLog ] && chmod u+w CommitLog
+fi
+bk changes -v -m -r${CLTAG}.. > CommitLog.new
mv CommitLog.new CommitLog
+case "$GCL_REMOVEWRITE" in
+ 1) chmod a-w CommitLog .
+esac