summaryrefslogtreecommitdiffstats
path: root/office/ganttproject/ganttproject
diff options
context:
space:
mode:
Diffstat (limited to 'office/ganttproject/ganttproject')
-rw-r--r--office/ganttproject/ganttproject25
1 files changed, 25 insertions, 0 deletions
diff --git a/office/ganttproject/ganttproject b/office/ganttproject/ganttproject
new file mode 100644
index 0000000000..dee15ada8e
--- /dev/null
+++ b/office/ganttproject/ganttproject
@@ -0,0 +1,25 @@
+#!/bin/sh
+# This script permits calling ganttproject from the /bin directly
+# rather than from /opt/ganttproject.
+# It supports white spaces in file names.
+# Chris Abela <chris.abela@maltats.com>
+
+# Usage: if /bin is in your $PATH, then:
+# $ ganttproject "World Domination Project.gan"
+# or simply: $ ganttproject
+
+[ $# -gt 1 ] && echo "Sorry! - Only one argument is allowed" && exit
+if [ $# -eq 1 ]
+then
+ DIRNAME=`dirname "$1"`
+ case "$DIRNAME" in
+ .) DIRNAME="$PWD" ;;
+ /) unset DIRNAME ;;
+ esac
+ BASENAME=`basename "$1"`
+ cd /opt/ganttproject
+ ./ganttproject.sh "$DIRNAME/$BASENAME"
+else
+ cd /opt/ganttproject
+ ./ganttproject.sh
+fi