install.sh
changeset 32 ceb700bc4a80
parent 31 b7a7e566833c
child 37 89f952b0f366
--- a/install.sh	Sat May 10 02:56:33 2008 +0000
+++ b/install.sh	Tue May 13 03:20:02 2008 +0000
@@ -9,6 +9,7 @@
 PREFIX=/usr/local
 PF_CONFDIR=$(postconf -h config_directory)
 PF_GID=$(id -g $(postconf -h mail_owner))
+LOCALE_DIR=${PREFIX}/share/locale
 DOC_DIR=${PREFIX}/share/doc/vmm
 MAN1DIR=${PREFIX}/share/man/man1
 MAN5DIR=${PREFIX}/share/man/man5
@@ -37,6 +38,16 @@
 install ${INSTALL_OPTS_CF} pgsql-*.cf ${PF_CONFDIR}/
 install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin
 
+[ -d ${LOCALE_DIR} ] || mkdir -m 0755 -p ${LOCALE_DIR}
+cd po
+for po in $(ls -1 *.po); do
+    lang=$(basename ${po} .po)
+    ddir=${LOCALE_DIR}/${lang}/LC_MESSAGES
+    [ -d ${ddir}  ] || mkdir -m 0755 -p ${ddir}
+    msgfmt -o ${LOCALE_DIR}/${lang}/LC_MESSAGES/vmm.mo ${po}
+done
+cd -
+
 [ -d ${MAN1DIR} ] || mkdir -m 0755 -p ${MAN1DIR}
 install -m 0644 ${INSTALL_OPTS} vmm.1 ${MAN1DIR}