rm -rf $to/sql/civicrm_*.??_??.mysql
set -e
}
+
+## Copy all packages
+## usage: dm_install_packages <packages_repo_path> <to_path>
+function dm_install_packages() {
+ local repo="$1"
+ local to="$2"
+
+ local excludes_rsync=""
+ for exclude in .git .svn _ORIGINAL_ SeleniumRC PHPUnit PhpDocumentor SymfonyComponents amavisd-new git-footnote ; do
+ excludes_rsync="--exclude=${exclude} ${excludes_rsync}"
+ done
+
+ [ ! -d "$to" ] && mkdir "$to"
+ rsync -avC $excludes_rsync --include=core "$repo/./" "$to/./"
+}
# copy all the stuff
dm_install_core "$SRC" "$TRG"
-for CODE in packages drupal; do
+dm_install_packages "$SRC/packages" "$TRG/packages"
+for CODE in drupal; do
echo $CODE
[ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
done
# copy all the stuff
dm_install_core "$SRC" "$TRG"
-for CODE in packages drupal; do
+dm_install_packages "$SRC/packages" "$TRG/packages"
+for CODE in drupal; do
echo $CODE
[ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
done
# copy all the stuff
dm_install_core "$SRC" "$TRG"
-for CODE in packages drupal; do
+dm_install_packages "$SRC/packages" "$TRG/packages"
+for CODE in drupal; do
echo $CODE
[ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
done
# copy all the rest of the stuff
dm_install_core "$SRC" "$TRG"
-for CODE in packages joomla ; do
+dm_install_packages "$SRC/packages" "$TRG/packages"
+for CODE in joomla ; do
echo $CODE
[ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG
done
# copy all the stuff
dm_install_core "$SRC" "$TRG/civicrm/civicrm"
-for CODE in packages ; do
- echo $CODE
- [ -d $SRC/$CODE ] && $RSYNCCOMMAND $SRC/$CODE $TRG/civicrm/civicrm
-done
+dm_install_packages "$SRC/packages" "$TRG/civicrm/civicrm/packages"
for F in $SRC/WordPress/*; do
cp $F $TRG/civicrm