Merge pull request #479 from colemanw/releaser
[civicrm-core.git] / distmaker / dists / drupal6_php5.sh
CommitLineData
6a488035 1#!/bin/bash
7c71cbb4 2set -ex
6a488035
TO
3
4# This script assumes
5# that DAOs are generated
6# and all the necessary conversions had place!
7
8P=`dirname $0`
9CFFILE=$P/../distmaker.conf
10
11if [ ! -f $CFFILE ] ; then
12 echo "NO DISTMAKER.CONF FILE!"
13 exit 1
14else
15 . $CFFILE
16fi
17
ee752347 18RSYNCOPTIONS="-avC $DM_EXCLUDES_RSYNC --include=core"
6a488035
TO
19RSYNCCOMMAND="$DM_RSYNC $RSYNCOPTIONS"
20SRC=$DM_SOURCEDIR
21TRG=$DM_TMPDIR/civicrm
22
ee752347 23
bed96570
TO
24# checkout the right code revisions
25pushd "$DM_SOURCEDIR/drupal"
26git checkout "$DM_REF_DRUPAL6"
27popd
28
6a488035
TO
29# make sure and clean up before
30if [ -d $TRG ] ; then
31 rm -rf $TRG/*
32fi
33
34# copy all the stuff
35for CODE in css i js packages PEAR templates bin CRM api drupal extern Reports install settings; do
36 echo $CODE
37 [ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
38done
39
40# delete any setup.sh or setup.php4.sh if present
41if [ -d $TRG/bin ] ; then
42 rm -f $TRG/bin/setup.sh
43 rm -f $TRG/bin/setup.php4.sh
44 rm -f $TRG/bin/setup.bat
45fi
46
47
48# copy selected sqls
49if [ ! -d $TRG/sql ] ; then
50 mkdir $TRG/sql
51fi
52
53for F in $SRC/sql/civicrm*.mysql $SRC/sql/counties.US.sql.gz $SRC/sql/case_sample*.mysql; do
54 cp $F $TRG/sql
55done
56
57set +e
58rm -rf $TRG/sql/civicrm_*.??_??.mysql
59set -e
60
61# copy docs
62cp $SRC/agpl-3.0.txt $TRG
63cp $SRC/gpl.txt $TRG
64cp $SRC/README.txt $TRG
50a340a5 65cp $SRC/CONTRIBUTORS.txt $TRG
6a488035
TO
66cp $SRC/agpl-3.0.exception.txt $TRG
67cp $SRC/drupal/civicrm.config.php.drupal $TRG/civicrm.config.php
68
6a488035
TO
69# final touch
70echo "<?php
71function civicrmVersion( ) {
72 return array( 'version' => '$DM_VERSION',
73 'cms' => 'Drupal6',
74 'revision' => '$DM_REVISION' );
75}
76" > $TRG/civicrm-version.php
77
78# gen tarball
79cd $TRG/..
80tar czf $DM_TARGETDIR/civicrm-$DM_VERSION-drupal6.tar.gz civicrm
81
82# clean up
83rm -rf $TRG