From: totten@civicrm.org Date: Sat, 21 Jun 2014 11:10:31 +0000 (-0700) Subject: distmaker - DRY common.sh X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bf20507d0be20a527aa9ac2f70d476d702951098;p=civicrm-core.git distmaker - DRY common.sh --- diff --git a/distmaker/dists/common.sh b/distmaker/dists/common.sh index 770719617d..dedde33563 100644 --- a/distmaker/dists/common.sh +++ b/distmaker/dists/common.sh @@ -9,7 +9,7 @@ function dm_install_dir() { if [ ! -d "$to" ]; then mkdir -p "$to" fi - rsync -va "$from/./" "$to/./" + rsync -avC --exclude=.git --exclude=.svn "$from/./" "$to/./" } ## Copy listed files @@ -84,14 +84,7 @@ function dm_install_packages() { function dm_install_drupal() { local repo="$1" local to="$2" - - local excludes_rsync="" - for exclude in .git .svn ; do - excludes_rsync="--exclude=${exclude} ${excludes_rsync}" - done - - [ ! -d "$to" ] && mkdir "$to" - rsync -avC $excludes_rsync "$repo/./" "$to/./" + dm_install_dir "$repo" "$to" } ## TODO: Merge this into dm_install_drupal; use on all Drupal releases @@ -117,14 +110,7 @@ function dm_install_drupal_info() { function dm_install_joomla() { local repo="$1" local to="$2" - - local excludes_rsync="" - for exclude in .git .svn ; do - excludes_rsync="--exclude=${exclude} ${excludes_rsync}" - done - - [ ! -d "$to" ] && mkdir "$to" - rsync -avC $excludes_rsync "$repo/./" "$to/./" + dm_install_dir "$repo" "$to" } ## Generate civicrm-version.php