From 671838fee95b9ae927a352779bfd6b4f7c60b76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 13 Jul 2010 18:41:13 +0200 Subject: [PATCH] Run Sunrise-specific checks only when in Sunrise. --- sunrise-commit | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sunrise-commit b/sunrise-commit index 9915800..f586cee 100755 --- a/sunrise-commit +++ b/sunrise-commit @@ -362,12 +362,16 @@ main() { # Creating a new ChangeLog? Let's take a look at the commit message. if [ ! -f ChangeLog ]; then [ -n "${trivial}" ] && die "Trivial change for an initial commit? You're joking, right?" - [ -z "${bns}" ] && die 'Please supply the bug number in the initial commit message!' - if [ ! -f metadata.xml ]; then - req cp ../../skel.metadata.xml metadata.xml - # Output similar to echangelog. - diff -dup /dev/null metadata.xml - req vcs_add metadata.xml + + # Sunrise-specific checks. + if [ "$(cat ../../profiles/repo_name 2>/dev/null)" = "sunrise" ]; then + [ -z "${bns}" ] && die 'Please supply the bug number in the initial commit message!' + if [ ! -f metadata.xml ]; then + req cp ../../skel.metadata.xml metadata.xml + # Output similar to echangelog. + diff -dup /dev/null metadata.xml + req vcs_add metadata.xml + fi fi fi