summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sunrise-commit')
-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 $?