From 5333240ab35cd0efb41989fc548971e081930f9e Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 19 Jun 2010 10:28:46 +0100 Subject: [PATCH] update authors and add mono-devel dependancy for building --- AUTHORS | 1 + README | 1 + SparkleShare/sparkleshare | 64 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 SparkleShare/sparkleshare diff --git a/AUTHORS b/AUTHORS index 517b60f8..3a579ae3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,3 +14,4 @@ Contributors: Oleg Khlystov Simon Pither Steven Harms + Bertrand Lorentz diff --git a/README b/README index cc90c0be..551dc670 100644 --- a/README +++ b/README @@ -58,6 +58,7 @@ To build SparkleShare you need: - gtk-sharp2-devel >= 2.12.7 - mono-core >= 2.2 + - mono-devel >= 2.2 - monodevelop >= 2.0 - ndesk-dbus-devel >= 0.6 - ndesk-dbus-glib-devel >= 0.6 diff --git a/SparkleShare/sparkleshare b/SparkleShare/sparkleshare new file mode 100644 index 00000000..ffffe824 --- /dev/null +++ b/SparkleShare/sparkleshare @@ -0,0 +1,64 @@ +#!/bin/bash + +pidfile=/tmp/sparkleshare/sparkleshare.pid + +# Create a directory to save the pid to +if [[ "$1" == "start" ]]; then + if [ -e "${pidfile}" ]; then + sparklepid=`cat ${pidfile}` + if [ -n "`ps -p ${sparklepid} | grep ${sparklepid}`" ] + then + echo "SparkleShare is already running" + exit 0 + else + echo "SparkleShare stale pid file found, starting a new instance" + rm -f $pidfile + fi + fi + + echo -n "Starting SparkleShare..." + mkdir -p /tmp/sparkleshare/ + # Start SparkleShare in the background and save the pid + mono "/usr/lib/sparkleshare/SparkleShare.exe" $2 & + PID=$! + echo $PID > /tmp/sparkleshare/sparkleshare.pid + echo " Done." +fi + +if [[ "$1" == "stop" ]]; then + if [ -e "/tmp/sparkleshare/sparkleshare.pid" ]; then + echo -n "Stopping SparkleShare..." + kill `cat /tmp/sparkleshare/sparkleshare.pid` + rm -f /tmp/sparkleshare/sparkleshare.pid + echo " Done." + else + echo "SparkleShare isn't running." + fi +fi + +if [[ "$1" == "restart" ]]; then + if [ -e "/tmp/sparkleshare/sparkleshare.pid" ]; then + echo -n "Stopping SparkleShare..." + kill `cat /tmp/sparkleshare/sparkleshare.pid` + rm -f /tmp/sparkleshare/sparkleshare.pid + echo " Done." + else + echo "SparkleShare isn't running." + fi + + if [ -e "/tmp/sparkleshare/sparkleshare.pid" ]; then + echo "SparkleShare is already running." + else + echo -n "Starting SparkleShare..." + + # Start SparkleShare in the background and save the pid + mono "/usr/lib/sparkleshare/SparkleShare.exe" $2 & + PID=$! + echo $PID > /tmp/sparkleshare/sparkleshare.pid + echo " Done." + fi +fi + +if [[ "$1" == "--help" ]]; then + mono "/usr/lib/sparkleshare/SparkleShare.exe" --help +fi