civicrm-bij1/scripts/download.sh

84 lines
3.5 KiB
Bash
Executable File

#!/bin/bash
set -e
version=5.64.0
WP_BASE=${1:-$PWD/wordpress/}
function download_ext {
# work-around for timeout issues on lab.civicrm.org during download
name="$1"
url="$2"
mkdir -p ${name}
filename=${name}/$(basename $url)
if [ ! -e $filename ]; then
echo "download_ext $filename $@"
curl -L --output $filename $url
fi
filetype=$(file --brief --mime $filename|cut -f1 -d';'|cut -f2 -d/)
case $filetype in
zip)
unzip -oq -d $name $filename
;;
gzip)
tar xf $filename
return
;;
esac
dirname=$(find ${name} -mindepth 1 -maxdepth 1 -name "${name}*" -type d )
echo "$dirname"
[ -z "$dirname" ] && return
mv -v $dirname ${name}.tmp && rm -rf $name && mv -v ${name}.tmp $name
}
mkdir -p ${WP_BASE}/wp-content/plugins
rm -rf ${WP_BASE}/wp-content/uploads/civicrm/ext
mkdir -p ${WP_BASE}/wp-content/uploads/civicrm/ext
# clone BIJ1 specific extensions
git config --global pull.ff only
# download all extensions
cd $WP_BASE/wp-content/plugins
download_ext wp-2fa https://downloads.wordpress.org/plugin/wp-2fa.2.4.1.zip
download_ext civicrm https://download.civicrm.org/civicrm-$version-wordpress.zip
# install l10n
cd $WP_BASE/wp-content/plugins/civicrm
download_ext l10n https://download.civicrm.org/civicrm-$version-l10n.tar.gz
# add specific CIVI extensions
cd ${WP_BASE}/wp-content/uploads/civicrm/ext
# FIXME: migratie verwijderen na migratie
# algemeen: velden en algemen instellingen
# rules: workflows
for repo in bij1migratie bij1rules bij1algemeen; do
[ -e ${repo} ] || git clone --depth 1 https://lab.civicrm.org/partners/civicoop/bij1/${repo}.git
done
download_ext org.project60.sepa https://github.com/Project60/org.project60.sepa/archive/refs/tags/1.9.1.zip
download_ext de.systopia.identitytracker https://github.com/systopia/de.systopia.identitytracker/releases/download/1.3/de.systopia.identitytracker-1.3.zip
download_ext org.project60.banking https://github.com/Project60/org.project60.banking/releases/download/0.8.3/org.project60.banking-0.8.3.zip
download_ext assignee https://lab.civicrm.org/extensions/assignee/-/archive/1.4/assignee-1.4.zip
download_ext apikey https://lab.civicrm.org/extensions/apikey/-/archive/v1.3.5/apikey-v1.3.5.zip
download_ext dataprocessor https://lab.civicrm.org/extensions/dataprocessor/-/archive/1.78/dataprocessor-1.78.zip
download_ext emailapi https://lab.civicrm.org/extensions/emailapi/-/archive/2.9/emailapi-2.9.zip
download_ext action-provider https://lab.civicrm.org/extensions/action-provider/-/archive/1.127/action-1.127.zip
download_ext form-processor https://lab.civicrm.org/extensions/form-processor/-/archive/1.60/form-1.60.zip
download_ext de.systopia.xcm https://github.com/systopia/de.systopia.xcm/releases/download/1.8/de.systopia.xcm-1.8.zip
download_ext group2summary https://lab.civicrm.org/extensions/group2summary/-/archive/1.6/group2summary-1.6.zip
download_ext org.project60.bic https://github.com/Project60/org.project60.bic/releases/download/1.8.0/org.project60.bic-1.8.0.zip
download_ext org.civicrm.contactlayout https://github.com/civicrm/org.civicrm.contactlayout/archive/2.2.1.zip
download_ext org.civicrm.recentmenu https://github.com/civicrm/org.civicrm.recentmenu/archive/1.5.zip
download_ext civirules https://lab.civicrm.org/extensions/civirules/-/archive/2.49/civirules-2.49.zip
download_ext org.wikimedia.relationshipblock https://github.com/eileenmcnaughton/org.wikimedia.relationshipblock/archive/1.6.zip
download_ext uk.co.vedaconsulting.mosaico https://download.civicrm.org/extension/uk.co.vedaconsulting.mosaico/3.2.1691060437/uk.co.vedaconsulting.mosaico-3.2.1691060437.zip
#