aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher (jlec) <jlec@j-schmitz.net>2009-04-26 11:21:44 +0200
committerJustin Lecher (jlec) <jlec@j-schmitz.net>2009-04-26 11:21:44 +0200
commita8b2f4d3d4dbd1863ff25a393195d395db743c64 (patch)
tree4eac1deda30997892102a8a62bf0f33b730bd295 /scripts/stage-blast-db
parentmoved scripts from Documentation to scripts (diff)
downloadsci-a8b2f4d3d4dbd1863ff25a393195d395db743c64.tar.gz
sci-a8b2f4d3d4dbd1863ff25a393195d395db743c64.tar.bz2
sci-a8b2f4d3d4dbd1863ff25a393195d395db743c64.zip
moved scripts from Documentation to scripts part 2
Diffstat (limited to 'scripts/stage-blast-db')
-rwxr-xr-xscripts/stage-blast-db41
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/stage-blast-db b/scripts/stage-blast-db
new file mode 100755
index 000000000..e3722cfee
--- /dev/null
+++ b/scripts/stage-blast-db
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+DATE=$(date "+%Y%m%d")
+CHANGE_ENTRY="automatic bump"
+
+# Find the Documentation dir from sci overlay
+
+if [[ -f $(basename $0) ]]; then
+ REPO_DOC=$(pwd)
+else
+ REPO_DOC=$(dirname $0)
+fi
+
+
+cd /tmp;
+wget http://www.ncbi.nlm.nih.gov/blast/docs/update_blastdb.pl >& /dev/null
+
+# Ask for which database
+
+echo "Which db should be updated ?"
+echo ""
+perl -w update_blastdb.pl --passiv --showall
+echo ""
+read DB
+
+
+# Fetch the database and rename it
+
+perl -w update_blastdb.pl --passiv ${DB}
+
+for mydb in ${DB}*; do
+ mv ${mydb} ${mydb#.tar.gz}-${DATE}.tar.gz
+done
+
+cd ${REPO_DOC}/../sci-libs/blast-db-${DB};
+git mv blast-db-${DB}*ebuild blast-db-${DB}-${DATE}.ebuild
+git add .
+echangelog "${CHANGE_ENTRY}"
+reapoman -d -v fix
+git add .
+