Script to Remotely Deploy OSGI jar

Description

This is a bash script that will allow you to remotely deploy an OSGi plugin via the command line.  This is helpful when developing remotely

Attachment: deploy_osgi.sh (1 KB)

Code

${esc.hash}!/bin/sh

PLUGIN_JAR=/Users/will/git/XXXXXXXXXX/build/jar/bundle-XXXXXXXXXX.jar
USERNAME=will@dotcms.com
PASSWD=XXXXXXXXXX
${esc.hash}URL=http://support.dotcms.com
URL=http://localhost:8080

rm ~/cookies.txt

${esc.hash}autheticate
curl -v -b ~/cookies.txt -c ~/cookies.txt --data "my_account_cmd=auth&my_account_login=${esc.dollar}USERNAME&password=${esc.dollar}PASSWD" "${esc.dollar}URL/c/portal_public/login" 


echo
echo

${esc.hash}publish a plugin
curl -v  -b ~/cookies.txt  -F bundleUpload=@${esc.dollar}PLUGIN_JAR "${esc.dollar}URL/DotAjaxDirector/com.dotmarketing.portlets.osgi.AJAX.OSGIAJAX/?cmd=add"


rm ~/cookies.txt