summaryrefslogtreecommitdiff
path: root/setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'setup.sh')
-rwxr-xr-xsetup.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/setup.sh b/setup.sh
index e25ec73..5adcc67 100755
--- a/setup.sh
+++ b/setup.sh
@@ -43,10 +43,18 @@ if [ -f xtract."$osname" ]
then
chmod +x xtract."$osname"
else
- echo "Unable to download a prebuilt xtract executable; attempting to"
- echo "build one from xtract.go. A Perl fallback is also available, and"
- echo "will be used if necessary, so please disregard any errors below."
- go build -o xtract."$osname" xtract.go
+ if hash go 2>/dev/null
+ then
+ echo "Unable to download xtract executable; building from xtract.go."
+ go build -o xtract."$osname" xtract.go
+ fi
+ if [ ! -f xtract."$osname" ]
+ then
+ echo -e "Unable to download xtract executable. Please execute the following:\n\n"
+ echo -e " ./ftp-cp ftp.ncbi.nlm.nih.gov /entrez/entrezdirect xtract.$osname.gz"
+ echo -e " gunzip -f xtract.$osname.gz\n"
+ echo -e " chmod +x xtract.$osname\n"
+ fi
fi
echo ""