Author: ruschein
Date: 2010-08-02 09:54:26 -0700 (Mon, 02 Aug 2010)
New Revision: 21116
Modified:
cytoscape/trunk/resources/bin/cytoscape.sh
cytoscape/trunk/resources/bin/gen_vmoptions.sh
Log:
Fixed running cytoscape.sh from a directory that is not the installation
directory.
Modified: cytoscape/trunk/resources/bin/cytoscape.sh
===================================================================
--- cytoscape/trunk/resources/bin/cytoscape.sh 2010-08-01 19:56:32 UTC (rev
21115)
+++ cytoscape/trunk/resources/bin/cytoscape.sh 2010-08-02 16:54:26 UTC (rev
21116)
@@ -1,20 +1,20 @@
#!/bin/sh
#
# Run cytoscape from a jar file
-# this is a UNIX-only version
+# This script is a UNIX-only (i.e. Linux, Mac OS, etc.) version
#-------------------------------------------------------------------------------
-script_path=$(dirname -- $0)
+script_path="$(dirname -- $0)"
# Attempt to generate Cytoscape.vmoptions if it doesn't exist!
-if [ ! -e Cytoscape.vmoptions -a -x $script_path/gen_vmoptions.sh ]; then
- $script_path/gen_vmoptions.sh
+if [ ! -e "$script_path/Cytoscape.vmoptions" -a -x
"$script_path/gen_vmoptions.sh" ]; then
+ "$script_path/gen_vmoptions.sh"
fi
if [ -r Cytoscape.vmoptions ]; then
- java `cat Cytoscape.vmoptions` -jar $script_path/cytoscape.jar -p
$script_path/plugins "$@"
+ java `cat "$script_path/Cytoscape.vmoptions"` -jar
"$script_path/cytoscape.jar" -p "$script_path/plugins" "$@"
else # Just use sensible defaults.
java -d64 -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -Xss10M
-Xmx1550M \
- -jar $script_path/cytoscape.jar -p $script_path/plugins "$@"
+ -jar "$script_path/cytoscape.jar" -p "$script_path/plugins" "$@"
fi
Modified: cytoscape/trunk/resources/bin/gen_vmoptions.sh
===================================================================
--- cytoscape/trunk/resources/bin/gen_vmoptions.sh 2010-08-01 19:56:32 UTC
(rev 21115)
+++ cytoscape/trunk/resources/bin/gen_vmoptions.sh 2010-08-02 16:54:26 UTC
(rev 21116)
@@ -1,16 +1,19 @@
#!/bin/sh
# Generates the Cytoscape.vmoptions file
+
+script_path="$(dirname -- $0)"
+
if `java -version 2>&1 | grep -- 64-Bit > /dev/null`; then # We have a 64 bit
JVM.
- echo -Xms20m > Cytoscape.vmoptions
- echo -Xmx20g >> Cytoscape.vmoptions
- echo -d64 >> Cytoscape.vmoptions
+ echo -Xms20m > "$script_path/Cytoscape.vmoptions"
+ echo -Xmx20g >> "$script_path/Cytoscape.vmoptions"
+ echo -d64 >> "$script_path/Cytoscape.vmoptions"
else # Assume a 32 bit JVM.
- echo -Xms10m > Cytoscape.vmoptions
- echo -Xmx1550m >> Cytoscape.vmoptions
+ echo -Xms10m > "$script_path/Cytoscape.vmoptions"
+ echo -Xmx1550m >> "$script_path/Cytoscape.vmoptions"
fi
# Shared JVM options
-echo -Dswing.aatext=true >> Cytoscape.vmoptions
-echo -Dawt.useSystemAAFontSettings=lcd >> Cytoscape.vmoptions
+echo -Dswing.aatext=true >> "$script_path/Cytoscape.vmoptions"
+echo -Dawt.useSystemAAFontSettings=lcd >> "$script_path/Cytoscape.vmoptions"
exit 0
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.