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

index 3f3dec42b51cff768d9570ecb0eab442551288ae..75f167dee2be6cad0c5d3a492dc035434cef4866 100644 (file)
@@ -125,6 +125,14 @@ function dm_install_l10n() {
   dm_install_dir "$repo" "$to"
 }
 
+##  usage: dm_install_wordpress <wp_repo_path> <to_path>
+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 <file> <ufname>
 function dm_generate_version() {
index ea3582acfcde52f0de42560656556b217edc1be4..22e04252bd7f18a882532fd052c9dee34f7f208e 100644 (file)
@@ -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