distmaker - Demindfuckify joomla_php5.sh
authortotten@civicrm.org <Tim Otten>
Sat, 21 Jun 2014 12:31:20 +0000 (05:31 -0700)
committertotten@civicrm.org <Tim Otten>
Sun, 22 Jun 2014 07:58:08 +0000 (00:58 -0700)
distmaker/dists/common.sh
distmaker/dists/joomla_php5.sh

index 340c7f45e66587a646fc75d3f1418c79e8d89280..39159de7c90743de110ebce2ab8d06f0ba6aaa03 100644 (file)
@@ -126,6 +126,12 @@ function dm_install_joomla() {
   local repo="$1"
   local to="$2"
   dm_install_dir "$repo" "$to"
+
+  ## Before this change, the zip file included the joomla-integration
+  ## modules twice. The two were basically identical -- except that
+  ## one included .gitignore and the omitted it. We'll now omit it
+  ## consistently.
+  rm -f "$to/.gitignore"
 }
 
 ## usage: dm_install_l10n <l10n_repo_path> <to_path>
index 70c3d6e2d7a0f6c4ebcdc5a80460319b75bc8734..05865ddd7cbcf591f64814af3610d1297456ce4a 100755 (executable)
@@ -20,50 +20,25 @@ git checkout "$DM_REF_JOOMLA"
 popd
 
 # copy all the rest of the stuff
-dm_reset_dirs "$TRG"
+dm_reset_dirs "$TRG" "$DM_TMPDIR/com_civicrm"
 cp $SRC/civicrm.config.php $TRG
 dm_generate_version "$TRG/civicrm-version.php" Joomla
 dm_install_core "$SRC" "$TRG"
 dm_install_packages "$SRC/packages" "$TRG/packages"
+
+## WTF: It's so good we'll install it twice!
+## (The first is probably extraneous, but there could be bugs dependent on it.)
 dm_install_joomla "$SRC/joomla" "$TRG/joomla"
+dm_install_joomla "$SRC/joomla" "$DM_TMPDIR/com_civicrm"
+
+## joomla 3.0 likes admin.civicrm.php to be called civicrm.php; keep both names
+cp "$SRC/joomla/admin/admin.civicrm.php" "$DM_TMPDIR/com_civicrm/admin/civicrm.php"
 
 # gen zip file
 cd $DM_TMPDIR;
 
-mkdir com_civicrm
-mkdir com_civicrm/admin
-mkdir com_civicrm/site
-mkdir com_civicrm/site/elements
-mkdir com_civicrm/admin/civicrm
-mkdir com_civicrm/admin/language
-mkdir com_civicrm/admin/language/en-GB
-mkdir com_civicrm/admin/helpers
-mkdir com_civicrm/admin/plugins
-
-# copying back end code to admin folder
-cp civicrm/joomla/script.civicrm.php             com_civicrm/
-cp civicrm/joomla/admin/admin.civicrm.php        com_civicrm/admin
-cp civicrm/joomla/admin/config.xml               com_civicrm/admin
-cp civicrm/joomla/admin/configure.php            com_civicrm/admin
-cp civicrm/joomla/admin/license.civicrm.txt      com_civicrm/admin
-cp civicrm/joomla/admin/toolbar.civicrm.php      com_civicrm/admin
-cp civicrm/joomla/admin/toolbar.civicrm.html.php com_civicrm/admin
-cp -r -p civicrm/joomla/admin/helpers/*          com_civicrm/admin/helpers
-cp -r -p civicrm/joomla/admin/plugins/*          com_civicrm/admin/plugins
-cp civicrm/joomla/admin/language/en-GB/*         com_civicrm/admin/language/en-GB
-
-# joomla 3.0 like admin.civicrm.php to be called civicrm.php
-# lets keep both versions there
-cp com_civicrm/admin/admin.civicrm.php com_civicrm/admin/civicrm.php
-
-# copying front end code
-cp civicrm/joomla/site/civicrm.html.php      com_civicrm/site
-cp civicrm/joomla/site/civicrm.php           com_civicrm/site
-cp -r civicrm/joomla/site/views              com_civicrm/site
-cp -r -p civicrm/joomla/site/elements/*      com_civicrm/site/elements
-
 # generate alt version of package
-cp -r -p civicrm/* com_civicrm/admin/civicrm
+cp -r -p civicrm com_civicrm/admin/civicrm
 $DM_PHP $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION alt
 $DM_ZIP -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla-alt.zip com_civicrm
 rm -rf com_civicrm/admin/civicrm