[ooo-build-commit] .: bin/localize-ooo

Fridrich Strba fridrich at kemper.freedesktop.org
Tue Sep 7 02:59:02 PDT 2010


 bin/localize-ooo |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 82b9f60e4a0cd0a016496a5517f77724aed9ddd5
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Sep 7 11:57:01 2010 +0200

    Fix correctly occurences of SRCDIR and TOOLSDIR/src since they can differ

diff --git a/bin/localize-ooo b/bin/localize-ooo
index 441604b..0b638d2 100755
--- a/bin/localize-ooo
+++ b/bin/localize-ooo
@@ -8,7 +8,6 @@ if test -n "$OO_TOOLSDIR" ; then
     . $OO_TOOLSDIR/piece/sys-setup
     . $OO_TOOLSDIR/setup
     OOBUILDDIR=`pwd`
-    SRCDIR=$OO_TOOLSDIR/../src
     SRCDIR_PIECE=$OOBUILDDIR/ooo-build/sdf
     TOOLSDIR=$OO_TOOLSDIR/..
     OOO_LANGS_LIST=`echo $OO_LANGS | sed -e "s|ALL|$ALL_LANGS|g"`
@@ -94,9 +93,9 @@ done
 
 # lang-specific sdf files
 # it looks for files "any-name-<lang>.sdf", e.g. "gallery-hu.sdf"
-# it ignores files below $SRCDIR/clone (upstream sources available when --with-git is used)
+# it ignores files below $ (upstream sources available when --with-git is used)
 hungarian_updated=
-for sdf_file in `find $SRCDIR $DEB_GSIDIR $TOOLSDIR/po $SRCDIR_PIECE -path $SRCDIR/clone -prune -o -name "*.sdf"` ; do
+for sdf_file in `find $TOOLSDIR/src $DEB_GSIDIR $TOOLSDIR/po $SRCDIR_PIECE -path $TOOLSDIR/src/clone -prune -o -name "*.sdf"` ; do
 
     # check if it is lang-specific file
     echo "$sdf_file" | grep -q -f "$all_langs_pattern" || continue;
@@ -141,18 +140,18 @@ for sdf_file in `find $OOBUILDDIR/l10n/source -name "*.sdf" | sort` ; do
     echo -n "."
     grep -E "STR_...._MODULE_LANGPACK_" $sdf_file >> $sdf_langpack
 done
-sed -e 's/source\\ooo\\module_langpack\.ulf/source\\accessories\\module_samples_accessories\.ulf/g' $sdf_langpack > $SRCDIR/accessories-samples-langpack.sdf
-sed -e 's/source\\ooo\\module_langpack\.ulf/source\\accessories\\module_templates_accessories\.ulf/g' $sdf_langpack > $SRCDIR/accessories-templates-langpack.sdf
-sed -e 's/source\\ooo\\module_langpack\.ulf/source\\extensions\\module_extensions_sun_templates\.ulf/g' $sdf_langpack > $SRCDIR/extensions-sun-templates-langpack.sdf
-sed -e 's/source\\ooo\\module_langpack\.ulf/source\\extensions\\module_extensions_lightproof\.ulf/g' $sdf_langpack > $SRCDIR/extensions-lightproof-langpack.sdf
+sed -e 's/source\\ooo\\module_langpack\.ulf/source\\accessories\\module_samples_accessories\.ulf/g' $sdf_langpack > $TOOLSDIR/src/accessories-samples-langpack.sdf
+sed -e 's/source\\ooo\\module_langpack\.ulf/source\\accessories\\module_templates_accessories\.ulf/g' $sdf_langpack > $TOOLSDIR/src/accessories-templates-langpack.sdf
+sed -e 's/source\\ooo\\module_langpack\.ulf/source\\extensions\\module_extensions_sun_templates\.ulf/g' $sdf_langpack > $TOOLSDIR/src/extensions-sun-templates-langpack.sdf
+sed -e 's/source\\ooo\\module_langpack\.ulf/source\\extensions\\module_extensions_lightproof\.ulf/g' $sdf_langpack > $TOOLSDIR/src/extensions-lightproof-langpack.sdf
 rm $sdf_langpack
 echo "done!"
 
 echo "Processing non language specific files:"
 # apply lang-non-specific sdf files
 # the files "any-name-<lang>.sdf" are ignored because they are already processed above
-# it ignores files below $SRCDIR/clone (upstream sources available when --with-git is used)
-for fn in `find $SRCDIR $DEB_GSIDIR $TOOLSDIR/po $SRCDIR_PIECE -path $SRCDIR/clone -prune -o -name "*.sdf"` ; do
+# it ignores files below $TOOLSDIR/src/clone (upstream sources available when --with-git is used)
+for fn in `find $TOOLSDIR/src $DEB_GSIDIR $TOOLSDIR/po $SRCDIR_PIECE -path $TOOLSDIR/src/clone -prune -o -name "*.sdf"` ; do
     [ -f "$fn" ] || continue
     # skip if already processed as lang-specific files
     grep -q "^$fn$" $extra_trans_lang_list 2>/dev/null && continue;
@@ -162,7 +161,7 @@ for fn in `find $SRCDIR $DEB_GSIDIR $TOOLSDIR/po $SRCDIR_PIECE -path $SRCDIR/clo
     echo "$fn" | grep -q "^$TOOLSDIR/po/sdf-templates" && continue;
     echo "$fn" | grep -q "^$TOOLSDIR/po/ooo-build.sdf" && continue;
     # skip exotic localizations that are not in $ALL_LANGS and thus not detected
-    echo "$fn" | grep -q "$SRCDIR/GSI" && ! echo $OOO_LANGS | grep -q "$(echo $(basename $fn) | cut -d'_' -f2)" && continue;
+    echo "$fn" | grep -q "$TOOLSDIR/src/GSI" && ! echo $OOO_LANGS | grep -q "$(echo $(basename $fn) | cut -d'_' -f2)" && continue;
     echo "$fn" | grep -q "$TOOLSDIR/po/ooo-build" && ! echo $OOO_LANGS | grep -q "$(echo $(basename $fn) | cut -d'-' -f3)" && continue;
     merge_localization "$fn" "all" || exit 1;
     echo "$fn" >>$extra_trans_stamp


More information about the ooo-build-commit mailing list