Code

- Tool will do everything automatically
[gosa.git] / gosa-core / debian / patches / 04_fix_locale_location.dpatch
index 1f969af3b6042c5ca3bc3732b273273b5cc0e72f..6ed0165acda9340da26ff7b75740659a088284f4 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_fix_locale_location.dpatch by  <cajus@localhost>
+## 04_fix_locale_location.dpatch by  <cajus@debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Fixed location of auto-generated locales
 
 @DPATCH@
 diff -urNad gosa-2.6.0+svn11288~/include/php_setup.inc gosa-2.6.0+svn11288/include/php_setup.inc
@@ -27,22 +27,22 @@ diff -urNad gosa-2.6.0+svn11288~/update-gosa gosa-2.6.0+svn11288/update-gosa
 -              if (!is_dir(LOCALE_DIR."/compiled/${language}/LC_MESSAGES")){
 -                      if (!mkdir (LOCALE_DIR."/compiled/${language}/LC_MESSAGES", 0755, TRUE)){
 -                              echo "Failed to create '".LOCALE_DIR."/compiled/${language}/LC_MESSAGES'- aborted";
-+              if (!is_dir("/var/cache/gosa/locale/compiled/${language}/LC_MESSAGES")){
-+                      if (!mkdir ("/var/cache/gosa/locale/compiled/${language}/LC_MESSAGES", 0755, TRUE)){
-+                              echo "Failed to create '/var/cache/gosa/locale/compiled/${language}/LC_MESSAGES'- aborted";
++              if (!is_dir("/var/cache/gosa/locale/${language}/LC_MESSAGES")){
++                      if (!mkdir ("/var/cache/gosa/locale/${language}/LC_MESSAGES", 0755, TRUE)){
++                              echo "Failed to create '/var/cache/gosa/locale/${language}/LC_MESSAGES'- aborted";
                                exit (3);
                        }
                }
  
                /* Cat all these po files into one single file */
 -              system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > compiled/${language}/LC_MESSAGES/messages.po)", $val);
-+              system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > /var/cache/gosa/locale/compiled/${language}/LC_MESSAGES/messages.po)", $val);
++              system ("(cd ".LOCALE_DIR." && msgcat --use-first ".implode(" ", $po_files)." > /var/cache/gosa/locale/${language}/LC_MESSAGES/messages.po)", $val);
                if ($val != 0){
                        echo "Merging of message files failed - aborted";
                        exit (4);
                }
 -              system ("(cd ".LOCALE_DIR."/compiled/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val);
-+              system ("(cd /var/cache/gosa/locale/compiled/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val);
++              system ("(cd /var/cache/gosa/locale/${language}/LC_MESSAGES && msgfmt -o messages.mo messages.po && rm messages.po)", $val);
                if ($val != 0){
                        echo "Compiling of message files failed - aborted";
                        exit (5);