distmaker - Make DM_PHP, DM_RSYNC, and DM_ZIP optional
authorTim Otten <totten@civicrm.org>
Wed, 7 Jan 2015 19:57:28 +0000 (11:57 -0800)
committerTim Otten <totten@civicrm.org>
Wed, 7 Jan 2015 19:58:28 +0000 (11:58 -0800)
distmaker/distmaker.conf.dist
distmaker/distmaker.sh
distmaker/dists/common.sh
distmaker/dists/joomla_php5.sh
distmaker/dists/wordpress_php5.sh

index a1b4f9b38269228a2609cb9933e76bf5dca4f673..f631f20bfdf999f0df86150ec8cf6ea9a39a8abc 100644 (file)
@@ -4,11 +4,10 @@ DM_GENFILESDIR= <Set this to directory where generated files should reside>
 DM_TMPDIR= <Set this to temporary directory>
 DM_TARGETDIR= <Set this to directory where tarballs should land>
 
-DM_PHP= <Set this to your php binary>
-DM_RSYNC= <set this to your rsync binary>
-DM_ZIP= <set this to your zip binary>
-
 ## Optional
+# DM_PHP= <Set this to your php binary> [default: php]
+# DM_RSYNC= <set this to your rsync binary> [default: rsync]
+# DM_ZIP= <set this to your zip binary> [default: zip]
 # DM_NPM= <Set this to your npm binary> [default: npm]
 # DM_NODE= <Set this to your node binary> [default: node]
 # DM_COMPOSER= <Set this to your composer binary> [default: composer]
index 404ad852bb49402770321bef725b5bbf57873e8e..179c54aacd731e30ddccff9ce6c87b842fd383dc 100755 (executable)
@@ -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
 
index b6a4c752f7de5d5309c109cb5a396313d9881272..8b7211654f2e12761fbabaeef8feacac456e4b4c 100644 (file)
@@ -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 <wp_repo_path> <to_path>
@@ -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 \
index 7c1a25b476e09b6576ce8fc81fbc0f7276dd3eee..edbe8f6e6628372ed48795df5a4973ff32f2ffe6 100755 (executable)
@@ -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
index 25bff97ff42c2ee4918e02b4d2f48a5eb58cdca8..e115fc35fcd866e61c6c763f37c5e8e9c67973c7 100644 (file)
@@ -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