EXT-56 - dm_install_cvext - Add helper for including extensions
authorTim Otten <totten@civicrm.org>
Mon, 2 Oct 2017 03:12:37 +0000 (23:12 -0400)
committerTim Otten <totten@civicrm.org>
Thu, 11 Jan 2018 16:39:13 +0000 (08:39 -0800)
distmaker/dists/common.sh

index 922c10dea6ff23a68c06b613d455d127ac41ee2c..f3a8cca6e11da230d48f8292ada202e97d930e3b 100644 (file)
@@ -236,6 +236,13 @@ function dm_git_checkout() {
   popd
 }
 
+## Download a Civi extension
+## usage: dm_install_cvext <full-ext-key> <target-path>
+function dm_install_cvext() {
+  # cv dl -b '@https://civicrm.org/extdir/ver=4.7.25|cms=Drupal/com.iatspayments.civicrm.xml' --destination=$PWD/iatspayments
+  cv dl -b "@https://civicrm.org/extdir/ver=$DM_VERSION|cms=Drupal/$1.xml" --to="$2"
+}
+
 ## Edit a file by applying a regular expression.
 ## Note: We'd rather just call "sed", but it differs on GNU+BSD.
 ## usage: dm_preg_edit <search-pattern> <replacement-pattern> <file>