Fixed mispelling: comparitor -> comparator.
[civicrm-core.git] / distmaker / dists / drupal_sk_php5.sh
index 6adaa0885c9f7a91bfa1497f3ef51c5ca44e1bd1..592cf9af975caa674e2ff1624d0be03ad62a4ab4 100755 (executable)
@@ -1,47 +1,26 @@
 #!/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/drupal"
-git checkout "$DM_REF_DRUPAL"
-popd
-
-# make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
-
 # copy all the stuff
-for CODE in css i js packages PEAR templates bin CRM api drupal extern Reports install settings Civi; do
-  echo $CODE
-  [ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
-done
-
-# delete any setup.sh or setup.php4.sh if present
-if [ -d $TRG/bin ] ; then
-  rm -f $TRG/bin/setup.sh
-  rm -f $TRG/bin/setup.php4.sh
-  rm -f $TRG/bin/setup.bat
-fi
+dm_reset_dirs "$TRG"
+cp $SRC/drupal/civicrm.config.php.drupal $TRG/civicrm.config.php
+dm_generate_version "$TRG/civicrm-version.php" Drupal
+dm_install_core "$SRC" "$TRG"
+dm_install_packages "$SRC/packages" "$TRG/packages"
+dm_install_drupal "$SRC/drupal" "$TRG/drupal"
 
 # delete packages that distributions on Drupal.org repalce if present
 # also delete stuff that we dont really use and should not be included
@@ -50,38 +29,6 @@ rm -rf $TRG/packages/IDS
 rm -rf $TRG/packages/jquery
 rm -rf $TRG/packages/ckeditor
 rm -rf $TRG/packages/tinymce
-rm -rf $TRG/joomla
-rm -rf $TRG/WordPress
-
-# copy selected sqls
-if [ ! -d $TRG/sql ] ; then
-       mkdir $TRG/sql
-fi
-
-for F in $SRC/sql/civicrm*.mysql $SRC/sql/case_sample*.mysql; do
-       cp $F $TRG/sql
-done
-
-set +e
-rm -rf $TRG/sql/civicrm_*.??_??.mysql
-set -e
-
-# copy docs
-cp $SRC/agpl-3.0.txt $TRG
-cp $SRC/gpl.txt $TRG
-cp $SRC/README.txt $TRG
-cp $SRC/CONTRIBUTORS.txt $TRG
-cp $SRC/agpl-3.0.exception.txt $TRG
-cp $SRC/drupal/civicrm.config.php.drupal $TRG/civicrm.config.php
-
-# final touch
-echo "<?php
-function civicrmVersion( ) {
-  return array( 'version'  => '$DM_VERSION',
-                'cms'      => 'Drupal',
-                'revision' => '$DM_REVISION' );
-}
-" > $TRG/civicrm-version.php
 
 # gen tarball
 cd $TRG/..