From: Tim Otten Date: Wed, 7 Jan 2015 19:57:28 +0000 (-0800) Subject: distmaker - Make DM_PHP, DM_RSYNC, and DM_ZIP optional X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e00b8b13049f0f858a24c29172c0b6773282cc44;p=civicrm-core.git distmaker - Make DM_PHP, DM_RSYNC, and DM_ZIP optional --- diff --git a/distmaker/distmaker.conf.dist b/distmaker/distmaker.conf.dist index a1b4f9b382..f631f20bfd 100644 --- a/distmaker/distmaker.conf.dist +++ b/distmaker/distmaker.conf.dist @@ -4,11 +4,10 @@ DM_GENFILESDIR= DM_TMPDIR= DM_TARGETDIR= -DM_PHP= -DM_RSYNC= -DM_ZIP= - ## Optional +# DM_PHP= [default: php] +# DM_RSYNC= [default: rsync] +# DM_ZIP= [default: zip] # DM_NPM= [default: npm] # DM_NODE= [default: node] # DM_COMPOSER= [default: composer] diff --git a/distmaker/distmaker.sh b/distmaker/distmaker.sh index 404ad852bb..179c54aacd 100755 --- a/distmaker/distmaker.sh +++ b/distmaker/distmaker.sh @@ -170,7 +170,7 @@ dm_generate_bower "$DM_SOURCEDIR" # Before anything - regenerate DAOs cd $DM_SOURCEDIR/xml -$DM_PHP GenCode.php schema/Schema.xml $DM_VERSION +${DM_PHP:-php} GenCode.php schema/Schema.xml $DM_VERSION cd $ORIGPWD diff --git a/distmaker/dists/common.sh b/distmaker/dists/common.sh index b6a4c752f7..8b7211654f 100644 --- a/distmaker/dists/common.sh +++ b/distmaker/dists/common.sh @@ -19,7 +19,7 @@ function dm_install_dir() { if [ ! -d "$to" ]; then mkdir -p "$to" fi - $DM_RSYNC -avC --exclude=.git --exclude=.svn "$from/./" "$to/./" + ${DM_RSYNC:-rsync} -avC --exclude=.git --exclude=.svn "$from/./" "$to/./" } ## Copy listed files @@ -56,7 +56,7 @@ function dm_install_bower() { done [ ! -d "$to" ] && mkdir "$to" - $DM_RSYNC -avC $excludes_rsync "$repo/./" "$to/./" + ${DM_RSYNC:-rsync} -avC $excludes_rsync "$repo/./" "$to/./" } ## Copy all core files @@ -106,7 +106,7 @@ function dm_install_packages() { ## packages/Files packages/PHP packages/Text [ ! -d "$to" ] && mkdir "$to" - $DM_RSYNC -avC $excludes_rsync --include=core "$repo/./" "$to/./" + ${DM_RSYNC:-rsync} -avC $excludes_rsync --include=core "$repo/./" "$to/./" } ## Copy Drupal-integration module @@ -162,7 +162,7 @@ function dm_install_vendor() { done [ ! -d "$to" ] && mkdir "$to" - $DM_RSYNC -avC $excludes_rsync "$repo/./" "$to/./" + ${DM_RSYNC:-rsync} -avC $excludes_rsync "$repo/./" "$to/./" } ## usage: dm_install_wordpress @@ -173,7 +173,7 @@ function dm_install_wordpress() { if [ ! -d "$to" ]; then mkdir -p "$to" fi - $DM_RSYNC -avC \ + ${DM_RSYNC:-rsync} -avC \ --exclude=.git \ --exclude=.svn \ --exclude=civicrm.config.php.wordpress \ diff --git a/distmaker/dists/joomla_php5.sh b/distmaker/dists/joomla_php5.sh index 7c1a25b476..edbe8f6e66 100755 --- a/distmaker/dists/joomla_php5.sh +++ b/distmaker/dists/joomla_php5.sh @@ -36,14 +36,14 @@ cd $DM_TMPDIR; # generate alt version of package cp -r -p civicrm com_civicrm/admin/civicrm -$DM_PHP $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION alt -$DM_ZIP -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla-alt.zip com_civicrm +${DM_PHP:-php} $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION alt +${DM_ZIP:-zip} -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla-alt.zip com_civicrm rm -rf com_civicrm/admin/civicrm # generate zip version of civicrm.xml -$DM_PHP $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION zip -$DM_ZIP -q -r -9 com_civicrm/admin/civicrm.zip civicrm -$DM_ZIP -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla.zip com_civicrm -x 'com_civicrm/admin/civicrm' +${DM_PHP:-php} $DM_SOURCEDIR/distmaker/utils/joomlaxml.php $DM_SOURCEDIR com_civicrm $DM_VERSION zip +${DM_ZIP:-zip} -q -r -9 com_civicrm/admin/civicrm.zip civicrm +${DM_ZIP:-zip} -q -r -9 $DM_TARGETDIR/civicrm-$DM_VERSION-joomla.zip com_civicrm -x 'com_civicrm/admin/civicrm' # clean up rm -rf com_civicrm diff --git a/distmaker/dists/wordpress_php5.sh b/distmaker/dists/wordpress_php5.sh index 25bff97ff4..e115fc35fc 100644 --- a/distmaker/dists/wordpress_php5.sh +++ b/distmaker/dists/wordpress_php5.sh @@ -26,7 +26,7 @@ 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