From bf20507d0be20a527aa9ac2f70d476d702951098 Mon Sep 17 00:00:00 2001 From: "totten@civicrm.org" Date: Sat, 21 Jun 2014 04:10:31 -0700 Subject: [PATCH] distmaker - DRY common.sh --- distmaker/dists/common.sh | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) 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 -- 2.25.1