[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r21890: {check} Install locales into ./locale (check/trunk/i18n)



Author: weasel
Date: 2010-03-09 18:14:34 +0000 (Tue, 09 Mar 2010)
New Revision: 21890

Modified:
   check/trunk/i18n/Makefile
Log:
Install locales into ./locale

Modified: check/trunk/i18n/Makefile
===================================================================
--- check/trunk/i18n/Makefile	2010-03-09 18:13:14 UTC (rev 21889)
+++ check/trunk/i18n/Makefile	2010-03-09 18:14:34 UTC (rev 21890)
@@ -1,28 +1,30 @@
 FILES=$(wildcard TorCheck_*.po)
 LANG=$(FILES:TorCheck_%.po=%)
 
+#LOCALEBASE=/usr/share/locale
+LOCALEBASE=locale
 
 all: check build install
 
 check:
 	for file in $(FILES); do		                                        \
-		msgfmt -c $$file;                                                       \
+		msgfmt -c $$file || exit 1;                                             \
 	done;
 
 build:
 	for lang in $(LANG); do			                                        \
-		msgfmt -o TorCheck_$$lang.mo TorCheck_$$lang.po;                        \
+		msgfmt -o "TorCheck_$$lang.mo" "TorCheck_$$lang.po" || exit 1;              \
 	done;
 
 install:
 	for lang in $(LANG); do                                                         \
-		mkdir -p /usr/share/locale/$$lang/LC_MESSAGES;                          \
-		mv TorCheck_$$lang.mo /usr/share/locale/$$lang/LC_MESSAGES/TorCheck.mo; \
+		mkdir -p "$(LOCALEBASE)/$$lang/LC_MESSAGES" &&                        \
+		mv "TorCheck_$$lang.mo" "$(LOCALEBASE)/$$lang/LC_MESSAGES/TorCheck.mo" || exit 1; \
 	done;
 
 uninstall:
 	for lang in $(LANG); do                                                         \
-		rm /usr/share/locale/$$lang/LC_MESSAGES/TorCheck.mo;                    \
+		rm "$(LOCALEBASE)/$$lang/LC_MESSAGES/TorCheck.mo" || exit 1;          \
 	done;
 
 clean: