X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=distmaker%2Fdists%2Fwordpress_php5.sh;h=e115fc35fcd866e61c6c763f37c5e8e9c67973c7;hb=09a0e7ae4af2cf7160e630659b99ffdcb281a03d;hp=9607f945920bd11978404aa29b8c06e00ff40183;hpb=83773afd1526c6da1ca8809953e19ebf63381712;p=civicrm-core.git diff --git a/distmaker/dists/wordpress_php5.sh b/distmaker/dists/wordpress_php5.sh index 9607f94592..e115fc35fc 100644 --- a/distmaker/dists/wordpress_php5.sh +++ b/distmaker/dists/wordpress_php5.sh @@ -1,95 +1,32 @@ #!/bin/bash set -ex -# This script assumes -# that DAOs are generated -# and all the necessary conversions had place! - P=`dirname $0` CFFILE=$P/../distmaker.conf - if [ ! -f $CFFILE ] ; then echo "NO DISTMAKER.CONF FILE!" exit 1 else . $CFFILE fi +. "$P/common.sh" -RSYNCOPTIONS="-avC $DM_EXCLUDES_RSYNC --include=core" -RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS" SRC=$DM_SOURCEDIR TRG=$DM_TMPDIR/civicrm -# checkout the right code revisions -pushd "$DM_SOURCEDIR/WordPress" -git checkout "$DM_REF_WORDPRESS" -popd - -# make sure and clean up before -if [ -d $TRG ] ; then - rm -rf $TRG/* -fi - -if [ ! -d $TRG ] ; then - mkdir $TRG -fi - -if [ ! -d $TRG/civicrm ] ; then - mkdir $TRG/civicrm -fi - -if [ ! -d $TRG/civicrm/civicrm ] ; then - mkdir $TRG/civicrm/civicrm -fi - # copy all the stuff -for CODE in css i js packages PEAR templates bin CRM api extern Reports install settings Civi; do - echo $CODE - [ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG/civicrm/civicrm -done - -# delete any setup.sh or setup.php4.sh if present -if [ -d $TRG/civicrm/civicrm/bin ] ; then - rm -f $TRG/civicrm/civicrm/bin/setup.sh - rm -f $TRG/civicrm/civicrm/bin/setup.php4.sh - rm -f $TRG/civicrm/civicrm/bin/setup.bat -fi - -# copy selected sqls -if [ ! -d $TRG/civicrm/civicrm/sql ] ; then - mkdir $TRG/civicrm/civicrm/sql -fi - -for F in $SRC/sql/civicrm*.mysql $SRC/sql/case_sample*.mysql; do - cp $F $TRG/civicrm/civicrm/sql -done - -set +e -rm -rf $TRG/civicrm/civicrm/sql/civicrm_*.??_??.mysql -set -e - -for F in $SRC/WordPress/*; do - cp $F $TRG/civicrm -done -rm -f $TRG/civicrm/civicrm.config.php.wordpress - -# copy docs -cp $SRC/agpl-3.0.txt $TRG/civicrm/civicrm -cp $SRC/gpl.txt $TRG/civicrm/civicrm -cp $SRC/README.txt $TRG/civicrm/civicrm +dm_reset_dirs "$TRG" "$TRG/civicrm/civicrm" cp $SRC/WordPress/civicrm.config.php.wordpress $TRG/civicrm/civicrm/civicrm.config.php - -# final touch -echo " '$DM_VERSION', - 'cms' => 'Wordpress', - 'revision' => '$DM_REVISION' ); -} -" > $TRG/civicrm/civicrm/civicrm-version.php +dm_generate_version "$TRG/civicrm/civicrm/civicrm-version.php" Wordpress +dm_install_core "$SRC" "$TRG/civicrm/civicrm" +dm_install_packages "$SRC/packages" "$TRG/civicrm/civicrm/packages" +dm_install_vendor "$SRC/vendor" "$TRG/civicrm/civicrm/vendor" +dm_install_bower "$SRC/bower_components" "$TRG/civicrm/civicrm/bower_components" +dm_install_wordpress "$SRC/WordPress" "$TRG/civicrm" # gen tarball cd $TRG -$DM_ZIP -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-wordpress.zip * +${DM_ZIP:-zip} -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-wordpress.zip * + # clean up rm -rf $TRG