CRM-15380 - Replaces PR 4273.
[civicrm-core.git] / distmaker / dists / drupal6_php5.sh
index 392d6252b7c932259f37412c9adaab0d8e834dd4..feb201e2446700c7ae94f9caa3f7b7ab7631338d 100755 (executable)
@@ -1,57 +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 .
-git checkout "$DM_REF_DRUPAL6"
-popd
-
-# make sure and clean up before
-if [ -d $TRG ] ; then
-       rm -rf $TRG/*
-fi
-
 # copy all the stuff
-dm_install_core "$SRC" "$TRG"
-for CODE in packages drupal; do
-  echo $CODE
-  [ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
-done
-
-# copy docs
+dm_reset_dirs "$TRG"
 cp $SRC/drupal/civicrm.config.php.drupal $TRG/civicrm.config.php
-
-# final touch
-echo "<?php
-function civicrmVersion( ) {
-  return array( 'version'  => '$DM_VERSION',
-                'cms'      => 'Drupal6',
-                'revision' => '$DM_REVISION' );
-}
-" > $TRG/civicrm-version.php
+dm_generate_version "$TRG/civicrm-version.php" Drupal6
+dm_install_core "$SRC" "$TRG"
+dm_install_packages "$SRC/packages" "$TRG/packages"
+dm_install_drupal "$SRC/drupal" "$TRG/drupal"
 
 # gen tarball
 cd $TRG/..