summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <spyderous@gentoo.org>2005-12-15 15:48:34 +0000
committerDonnie Berkholz <spyderous@gentoo.org>2005-12-15 15:48:34 +0000
commit297b632ffd58db82cf9fd54b639685312aded7f3 (patch)
treec6e869ef90957f1baa3fc5085009d4b370abf3fd /sci-chemistry/rasmol/files/rasmol.sh.debian
parent-* ~x86 (diff)
downloadgentoo-2-297b632ffd58db82cf9fd54b639685312aded7f3.tar.gz
gentoo-2-297b632ffd58db82cf9fd54b639685312aded7f3.tar.bz2
gentoo-2-297b632ffd58db82cf9fd54b639685312aded7f3.zip
Update rasmol script to fall back to xdpyinfo if xwininfo isn't available. Depend on one of the two.
(Portage version: 2.0.53)
Diffstat (limited to 'sci-chemistry/rasmol/files/rasmol.sh.debian')
-rw-r--r--sci-chemistry/rasmol/files/rasmol.sh.debian6
1 files changed, 4 insertions, 2 deletions
diff --git a/sci-chemistry/rasmol/files/rasmol.sh.debian b/sci-chemistry/rasmol/files/rasmol.sh.debian
index e86da961a295..e559e902267b 100644
--- a/sci-chemistry/rasmol/files/rasmol.sh.debian
+++ b/sci-chemistry/rasmol/files/rasmol.sh.debian
@@ -15,8 +15,10 @@ export RASMOLPATH
RASMOL_VISUAL=8
-if [ -e /usr/bin/X11/xwininfo ]; then
+if [ -e /usr/bin/xwininfo ]; then
RASMOL_VISUAL=`xwininfo -root | perl -ne 'chomp;print if s|\s+Depth:\s+||'` ;
+elif [ -e /usr/bin/xdpyinfo ]; then
+ RASMOL_VISUAL=` xdpyinfo | perl -ne 'chomp;print if s|\s+depth of root window:\s+(.*)\splanes|\1|'` ;
fi
if [ -e "/etc/rasmol/.rasmol.conf" ]; then
@@ -47,4 +49,4 @@ if [ $RASMOL_VISUAL == 24 ]; then
RASMOL_VISUAL=32;
fi
-$RASMOLPATH/rasmol.$RASMOL_VISUAL $* \ No newline at end of file
+$RASMOLPATH/rasmol.$RASMOL_VISUAL $*