distmaker - Extract function dm_install_l10n()
authortotten@civicrm.org <Tim Otten>
Sat, 21 Jun 2014 11:10:55 +0000 (04:10 -0700)
committertotten@civicrm.org <Tim Otten>
Sun, 22 Jun 2014 07:55:01 +0000 (00:55 -0700)
distmaker/dists/common.sh
distmaker/dists/l10n.sh

index dedde335636bf7351b3807b6e1d04be79d405aed..c9a0687e9e6a0008978d3a110f1e242d6917e720 100644 (file)
@@ -113,6 +113,13 @@ function dm_install_joomla() {
   dm_install_dir "$repo" "$to"
 }
 
+## usage: dm_install_l10n <l10n_repo_path> <to_path>
+function dm_install_l10n() {
+  local repo="$1"
+  local to="$2"
+  dm_install_dir "$repo" "$to"
+}
+
 ## Generate civicrm-version.php
 ## usage: dm_generate_version <file> <ufname>
 function dm_generate_version() {
index df19397a92449f45b64f6f83a6a41a634986e7cc..6666b31baa5b14c8f53ef5a4168bc2a454df5071 100644 (file)
@@ -15,6 +15,8 @@ else
        . $CFFILE
 fi
 
+. "$P/common.sh"
+
 RSYNCOPTIONS="-avC $DM_EXCLUDES_RSYNC --include=core"
 RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS"
 SRC=$DM_SOURCEDIR
@@ -26,11 +28,7 @@ if [ -d $TRG ] ; then
 fi
 
 # copy all the stuff
-for CODE in l10n; do
-  echo $CODE
-  [ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
-done
-
+dm_install_l10n "$SRC/l10n" "$TRG/l10n"
 
 # copy selected sqls
 if [ ! -d $TRG/sql ] ; then