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

#!/bin/sh

PLUGIN_JAR=/Users/will/git/XXXXXXXXXX/build/jar/bundle-XXXXXXXXXX.jar
USERNAME=will@dotcms.com
PASSWD=XXXXXXXXXX
#URL=http://support.dotcms.com
URL=http://localhost:8080

rm ~/cookies.txt

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


echo
echo

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


rm ~/cookies.txt