summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Tarkovsky <alextarkovsky@gmail.org>2006-07-04 16:02:52 +0000
committerAlex Tarkovsky <alextarkovsky@gmail.org>2006-07-04 16:02:52 +0000
commitefb12d6bac616b2724695e99e1996ca74fdd4d41 (patch)
tree6df2f2c76a4dc4063f91b6e6adba1863577a989c
parentAdd new version 2.0.4 - minor security fix (diff)
downloadsunrise-efb12d6bac616b2724695e99e1996ca74fdd4d41.tar.gz
sunrise-efb12d6bac616b2724695e99e1996ca74fdd4d41.tar.bz2
sunrise-efb12d6bac616b2724695e99e1996ca74fdd4d41.zip
scripts/sunrise-commit: Only test for changes in cwd after svn add is run
svn path=/sunrise/; revision=464
-rwxr-xr-xscripts/sunrise-commit16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/sunrise-commit b/scripts/sunrise-commit
index e8f31d569..69afaafb1 100755
--- a/scripts/sunrise-commit
+++ b/scripts/sunrise-commit
@@ -14,7 +14,6 @@ YELLOW=$WARN
commit_category="$(echo `pwd` | awk -F/ '{ print $(NF-1) }')"
commit_package="$(echo `pwd` | awk -F/ '{ print $NF }')"
-commit_status="$(echo `svn status`)"
num_new_dirs=0
opt_changelog=0
opt_noformat=0
@@ -52,7 +51,7 @@ create_digests() {
repoman_check() {
if [[ "$opt_norepoman" == "0" ]] ; then
- if [[ "$(svn status)" =~ '\.ebuild' ]] ; then
+ if [[ "$(echo `svn status`)" =~ '\.ebuild' ]] ; then
ebegin "Running repoman"
export PORTDIR_OVERLAY="$(dirname $(dirname $(pwd)))"
repoman
@@ -80,7 +79,7 @@ svn_commit() {
done
if [[ "$opt_noformat" == "0" ]] ; then
- commit_status="$(echo `svn status`)"
+ local commit_status="$(echo `svn status`)"
if [[ "$commit_status" =~ '\.ebuild' ]] ; then
commit_message="${commit_category}/${commit_package}: ${commit_message}"
else
@@ -226,15 +225,16 @@ if [[ -z "$*" ]] ; then
exit 1
fi
-if [[ -z "$commit_status" ]] ; then
- ewarn "No changes found in current directory tree."
- exit 1
-fi
-
svn_up || exit $?
[[ ! -e metadata.xml ]] && cp ../../skel.metadata.xml metadata.xml >/dev/null 2>&1
changelog_append "$*" || exit $?
create_digests || exit $?
svn_add || exit $?
+
+if [[ -z "$(svn status)" ]] ; then
+ echo "!!! Error: No changes found in current directory tree. Aborting commit."
+ exit 1
+fi
+
repoman_check || exit $?
svn_commit "$*" || exit $?