Merge pull request #16501 from eileenmcnaughton/cancel_recur
[civicrm-core.git] / distmaker / dists / joomla_php5.sh
CommitLineData
6a488035 1#!/bin/bash
7c71cbb4 2set -ex
6a488035 3
6a488035
TO
4P=`dirname $0`
5CFFILE=$P/../distmaker.conf
6a488035
TO
6if [ ! -f $CFFILE ] ; then
7 echo "NO DISTMAKER.CONF FILE!"
8 exit 1
9else
10 . $CFFILE
11fi
69ff4a4a 12. "$P/common.sh"
13
6a488035
TO
14SRC=$DM_SOURCEDIR
15TRG=$DM_TMPDIR/civicrm
16
6a488035 17# copy all the rest of the stuff
80def6a8 18dm_reset_dirs "$TRG" "$DM_TMPDIR/com_civicrm"
fa379693 19cp $SRC/civicrm.config.php $TRG
20dm_generate_version "$TRG/civicrm-version.php" Joomla
69ff4a4a 21dm_install_core "$SRC" "$TRG"
c4f1d7e4 22dm_install_coreext "$SRC" "$TRG" $(dm_core_exts)
9f0ca23d 23dm_install_packages "$SRC/packages" "$TRG/packages"
c84eb16e 24dm_install_vendor "$SRC/vendor" "$TRG/vendor"
1446640b 25dm_install_bower "$SRC/bower_components" "$TRG/bower_components"
242d3c46 26dm_install_cvext com.iatspayments.civicrm "$TRG/ext/iatspayments"
80def6a8 27
28## WTF: It's so good we'll install it twice!
29## (The first is probably extraneous, but there could be bugs dependent on it.)
274ebc9e 30dm_install_joomla "$SRC/joomla" "$TRG/joomla"
80def6a8 31dm_install_joomla "$SRC/joomla" "$DM_TMPDIR/com_civicrm"
32
33## joomla 3.0 likes admin.civicrm.php to be called civicrm.php; keep both names
34cp "$SRC/joomla/admin/admin.civicrm.php" "$DM_TMPDIR/com_civicrm/admin/civicrm.php"
6a488035
TO
35
36# gen zip file
37cd $DM_TMPDIR;
38
5900072b 39# generate alt version of package
37913f89 40cp -R -p civicrm com_civicrm/admin/civicrm
e00b8b13
TO
41${DM_PHP:-php} $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION alt
42${DM_ZIP:-zip} -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla-alt.zip com_civicrm
6a488035
TO
43rm -rf com_civicrm/admin/civicrm
44
45# generate zip version of civicrm.xml
e00b8b13
TO
46${DM_PHP:-php} $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION zip
47${DM_ZIP:-zip} -q -r -9 com_civicrm/admin/civicrm.zip civicrm
48${DM_ZIP:-zip} -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla.zip com_civicrm -x 'com_civicrm/admin/civicrm'
6a488035
TO
49
50# clean up
51rm -rf com_civicrm
52rm -rf $TRG