From 9003e8e1dbc8e2a920b0037f651cb42e4d189499 Mon Sep 17 00:00:00 2001 From: "totten@civicrm.org" Date: Sat, 21 Jun 2014 04:36:29 -0700 Subject: [PATCH] distmaker - Extract function dm_install_wordpress() --- distmaker/dists/common.sh | 8 ++++++++ distmaker/dists/wordpress_php5.sh | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/distmaker/dists/common.sh b/distmaker/dists/common.sh index 3f3dec42b5..75f167dee2 100644 --- a/distmaker/dists/common.sh +++ b/distmaker/dists/common.sh @@ -125,6 +125,14 @@ function dm_install_l10n() { dm_install_dir "$repo" "$to" } +## usage: dm_install_wordpress +function dm_install_wordpress() { + local repo="$1" + local to="$2" + dm_install_dir "$repo" "$to" + dm_remove_files "$to" civicrm.config.php.wordpress .gitignore +} + ## Generate civicrm-version.php ## usage: dm_generate_version function dm_generate_version() { diff --git a/distmaker/dists/wordpress_php5.sh b/distmaker/dists/wordpress_php5.sh index ea3582acfc..22e04252bd 100644 --- a/distmaker/dists/wordpress_php5.sh +++ b/distmaker/dists/wordpress_php5.sh @@ -26,11 +26,7 @@ popd # copy all the stuff dm_install_core "$SRC" "$TRG/civicrm/civicrm" dm_install_packages "$SRC/packages" "$TRG/civicrm/civicrm/packages" - -for F in $SRC/WordPress/*; do - cp $F $TRG/civicrm -done -rm -f $TRG/civicrm/civicrm.config.php.wordpress +dm_install_wordpress "$SRC/WordPress" "$TRG/civicrm" # copy docs cp $SRC/WordPress/civicrm.config.php.wordpress $TRG/civicrm/civicrm/civicrm.config.php -- 2.25.1