package_name=trustcommerce
repository=/home/git/repositories/trustcommerce.git
-target_path=/var/www/civicrm_custom/extensions/org.fsf.payment.trustcommerce
remote_user=vcshookuser
+target_path=~$remote_user/stage/org.fsf.payment.trustcommerce/
-echo -n $(date "$date_fmt"); echo " - Starting post-update hook..."
+deploy_script=/usr/local/bin/deploy_tc.sh
+echo -n $(date "$date_fmt"); echo " - Starting post-update hook..."
# Unset GIT_DIR to allow for calls to git clone/pull
git update-server-info
rsync -arzSPX --exclude=.git/ --delete $local_checkout/* $remote_user@$target_host:$target_path/ #2>/dev/null
echo -n $(date "$date_fmt"); echo " - Updating target path permissions"
-ssh $remote_user@$target_host "find $remote_path -type f -print0 | xargs -0 chmod 644 && find $remote_path -type d -print0 | xargs -0 chmod 755" # 2>/dev/null
+ssh $remote_user@$target_host sudo $deploy_script
echo -n $(date "$date_fmt"); echo " - Packing for export to package host"
rm -f $local_checkout_base/*tar.gz