[Xfce4-commits] r29499 - in xfce4-dev-tools/trunk: . scripts
Jannis Pohlmann
jannis at xfce.org
Tue Feb 17 16:55:43 CET 2009
Author: jannis
Date: 2009-02-17 15:55:43 +0000 (Tue, 17 Feb 2009)
New Revision: 29499
Modified:
xfce4-dev-tools/trunk/ChangeLog
xfce4-dev-tools/trunk/scripts/xdt-commit
Log:
* scripts/xdt-commit: Replace grep -P with awk and thus make the
script more portable. Properly detect changed ChangeLogs in SVN.
This should get rid the empty lines when committing several
changed ChangeLogs (bug #4716). Patch provided by Alexander
Toresson.
Modified: xfce4-dev-tools/trunk/ChangeLog
===================================================================
--- xfce4-dev-tools/trunk/ChangeLog 2009-02-17 09:31:28 UTC (rev 29498)
+++ xfce4-dev-tools/trunk/ChangeLog 2009-02-17 15:55:43 UTC (rev 29499)
@@ -1,3 +1,11 @@
+2009-02-17 Jannis Pohlmann <jannis at xfce.org>
+
+ * scripts/xdt-commit: Replace grep -P with awk and thus make the
+ script more portable. Properly detect changed ChangeLogs in SVN.
+ This should get rid the empty lines when committing several
+ changed ChangeLogs (bug #4716). Patch provided by Alexander
+ Toresson.
+
2009-01-25 Jannis Pohlmann <jannis at xfce.org>
* == 4.5.99.1 released! ==
Modified: xfce4-dev-tools/trunk/scripts/xdt-commit
===================================================================
--- xfce4-dev-tools/trunk/scripts/xdt-commit 2009-02-17 09:31:28 UTC (rev 29498)
+++ xfce4-dev-tools/trunk/scripts/xdt-commit 2009-02-17 15:55:43 UTC (rev 29499)
@@ -84,7 +84,9 @@
if [ "$repo_type" = "svn" ]; then
# Determine SVN status
STATUS=$(svn status "${CHANGELOG}")
- STATUS=${STATUS:0:1}
+ if [ -z "$STATUS" ]; then
+ STATUS='?'
+ fi
elif [ "$repo_type" = "git" ]; then
# Determine git status, and fake it into svn-style status
STATUS=$(git status | grep -E "(modified|new file):[[:space:]]+${CHANGELOG}")
@@ -104,13 +106,13 @@
elif [ "$repo_type" = "git" ]; then
MSG=$(git diff --cached "${CHANGELOG}")
fi
- MSG=$(echo "$MSG" | grep -P '^\+\t' | sed 's/^+//')
+ MSG=$(echo "$MSG" | awk '/^+\t/' | sed 's/^+//')
# Append to commit message (and insert newline between ChangeLogs)
if [ -z "$COMMIT_MSG" ]; then
COMMIT_MSG="$MSG"
else
- COMMIT_MSG=$(echo "$COMMIT_MSG" $'\n' "$MSG")
+ COMMIT_MSG=$(echo "$COMMIT_MSG"$'\n'"$MSG")
fi
fi
fi
More information about the Xfce4-commits
mailing list