CVSROOT:        /cvsroot/www-bg
Module name:    www-bg
Changes by:     Yavor Doganov <yavor>   09/08/02 07:53:14

Modified files:
        .              : GNUmakefile 

Log message:
        Синхронизиране с GNUnited Nations 0.3.1.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/www-bg/GNUmakefile?cvsroot=www-bg&r1=1.3&r2=1.4

Patches:
Index: GNUmakefile
===================================================================
RCS file: /cvsroot/www-bg/www-bg/GNUmakefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- GNUmakefile 24 May 2009 07:16:46 -0000      1.3
+++ GNUmakefile 2 Aug 2009 07:53:14 -0000       1.4
@@ -27,6 +27,7 @@
 # GNU gettext >= 0.16
 # CVS
 # Subversion (if the www-LANG repository is SVN)
+# GNU Bzr (if the www-LANG repository is Bzr)
 # GNU Arch (if the www-LANG repository is Arch)
 
 SHELL = /bin/bash
@@ -43,14 +44,16 @@
 MSGFMT := msgfmt
 CVS := cvs
 SVN := svn
+BZR := bzr
 # Baz can be used alternatively; its commands are compatible.
 TLA := tla
 
 translations := $(shell find -name '*.$(TEAM).po' | sort)
+log := "Автоматично синхронизиране с 
официалното хранилище."
 
 # Determine the VCS.
 REPO := $(shell (test -d CVS && echo CVS) || (test -d .svn && echo SVN) \
-         || (test -d \{arch\} && echo Arch))
+         || (test -d .bzr && echo Bzr) || (test -d \{arch\} && echo Arch))
 ifndef REPO
 $(error Unsupported Version Control System)
 endif
@@ -62,11 +65,12 @@
 MSGMERGEVERBOSE := --verbose
 ECHO := echo $$file: ;
 CVSQUIET :=
+BZRQUIET := --verbose
+else
+CVSQUIET := -q
+BZRQUIET := --quiet
 endif
 
-# If not in VERBOSE mode, suppress the output from cvs/svn.
-CVSQUIET ?= -q
-
 # The command to update the CVS repositories.
 define cvs-update
 $(CVS) $(CVSQUIET) update -d -P
@@ -90,6 +94,8 @@
        $(cvs-update)
 else ifeq ($(REPO),SVN)
        $(svn-update)
+else ifeq ($(REPO),Bzr)
+       $(BZR) pull $(BZRQUIET)
 else ifeq ($(REPO),Arch)
        $(TLA) update
 endif
@@ -107,15 +113,22 @@
        done
 ifeq ($(VCS),yes)
 ifeq ($(REPO),CVS)
-       $(CVS) commit -m "Автоматично синхронизиране 
с официалното хранилище."
+       $(CVS) commit -m $(log)
 else ifeq ($(REPO),SVN)
-       $(SVN) commit -m "Автоматично синхронизиране 
с официалното хранилище."
+       $(SVN) commit -m $(log)
+else ifeq ($(REPO),Bzr)
+# The behavior of `bzr commit' is not very script-friendly: it will
+# exit with an error if there are no changes to commit.
+       if $(BZR) status --versioned --short | grep --quiet '^ M'; then \
+         $(BZR) commit $(BZRQUIET) -m $(log) && $(BZR) push $(BZRQUIET); \
+       else \
+         true; \
+       fi
 else ifeq ($(REPO),Arch)
 # Arch is so dumb that it will do a bogus commit (adding another
 # absolutely useless revision) even if there are no changes.
 # Fortunately, the exit status of `tla changes' is sane.
-       $(TLA) changes >/dev/null || $(TLA) commit -s \
-         "Автоматично синхронизиране с 
официалното хранилище."
+       $(TLA) changes >/dev/null || $(TLA) commit -s $(log)
 endif
 endif
 
_______________________________________________
Dict-notifications mailing list
[email protected]
http://zver.fsa-bg.org/cgi-bin/mailman/listinfo/dict-notifications

Reply via email to