From 6920964aad283ae36d90fd1b117f8ba9e151d4e3 Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Tue, 20 Dec 2005 11:50:59 +0000
Subject: [PATCH] fix for macosx app

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@3941 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 etc/run_blastp | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/etc/run_blastp b/etc/run_blastp
index 853a249d3..9b557691b 100755
--- a/etc/run_blastp
+++ b/etc/run_blastp
@@ -6,7 +6,7 @@
 # to customise this script see the function called run_one_prog below
 
 
-RCS_HEADER="$Header: //tmp/pathsoft/artemis/etc/run_blastp,v 1.3 2005-02-21 11:45:33 tjc Exp $"
+RCS_HEADER="$Header: //tmp/pathsoft/artemis/etc/run_blastp,v 1.4 2005-12-20 11:50:59 tjc Exp $"
 
 PROG=`echo $RCS_HEADER | sed 's/.*run_\(.*\),v.*/\1/'`
 
@@ -41,7 +41,18 @@ run_one_prog () {
 
 
     ### change these lines:
-    EXEC=blastall
+    EXEC=${EXEC-`which blastall 2>/dev/null`}
+
+    if [ ! -x "$EXEC" ]; then
+      EXEC=`find Artemis* -name blastall 2>/dev/null`
+    fi
+
+    if [ ! -d "$BLASTDB" ]; then
+      DATABASE_TMP="$PWD/"`find Artemis* -name blast-data 2>/dev/null`"/$DATABASE"
+      if [ -f "$DATABASE_TMP" ]; then
+        DATABASE="$DATABASE_TMP"
+      fi
+    fi
 
     echo "about to start $EXEC with input from $INPUT_FILE and output to"
     echo "$OUTPUT_FILE using database $DATABASE"
-- 
GitLab