From 274ebc9e256b361f91af883a8d5157d2e89670ef Mon Sep 17 00:00:00 2001 From: "totten@civicrm.org" Date: Sat, 21 Jun 2014 03:57:47 -0700 Subject: [PATCH] distmaker - Extract function dm_install_joomla() --- distmaker/dists/common.sh | 15 +++++++++++++++ distmaker/dists/joomla_php5.sh | 5 +---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/distmaker/dists/common.sh b/distmaker/dists/common.sh index 7af818fdb9..770719617d 100644 --- a/distmaker/dists/common.sh +++ b/distmaker/dists/common.sh @@ -112,6 +112,21 @@ function dm_install_drupal_info() { done } +## Copy Joomla-integration module +## usage: dm_install_joomla +function dm_install_joomla() { + local repo="$1" + local to="$2" + + local excludes_rsync="" + for exclude in .git .svn ; do + excludes_rsync="--exclude=${exclude} ${excludes_rsync}" + done + + [ ! -d "$to" ] && mkdir "$to" + rsync -avC $excludes_rsync "$repo/./" "$to/./" +} + ## Generate civicrm-version.php ## usage: dm_generate_version function dm_generate_version() { diff --git a/distmaker/dists/joomla_php5.sh b/distmaker/dists/joomla_php5.sh index cd84ac9c80..50994a5302 100755 --- a/distmaker/dists/joomla_php5.sh +++ b/distmaker/dists/joomla_php5.sh @@ -35,10 +35,7 @@ fi # copy all the rest of the stuff dm_install_core "$SRC" "$TRG" dm_install_packages "$SRC/packages" "$TRG/packages" -for CODE in joomla ; do - echo $CODE - [ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG -done +dm_install_joomla "$SRC/joomla" "$TRG/joomla" # copy docs cp $SRC/civicrm.config.php $TRG -- 2.25.1