Mercurial > repos > petrn > repeatexplorer
comparison fetch_databases.sh @ 0:f6ebec6e235e draft
Uploaded
author | petrn |
---|---|
date | Thu, 19 Dec 2019 13:46:43 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f6ebec6e235e |
---|---|
1 #!/bin/bash | |
2 #set -euo pipefail | |
3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
4 echo "protein databases necessary for full clustering analysis" | |
5 echo "are downloaded from bitbucket repository using git" | |
6 echo "" | |
7 cd $DIR | |
8 git clone https://bitbucket.org/petrnovak/re_databases.git 2> $DIR/.fetchdb.log | |
9 GITEXIT=$? | |
10 if [ $GITEXIT -eq "0" ] | |
11 then | |
12 echo "databases successfully downloaded" | |
13 ln -sf $DIR/re_databases/* $DIR/databases/ | |
14 fi | |
15 # cat $DIR/.fetchdb.log | |
16 if [ $GITEXIT -eq "128" ] | |
17 then | |
18 if grep -q -F "Authentication failed" $DIR/.fetchdb.log | |
19 then | |
20 echo "get login credential from (neumann at umbr.cas.cz)!" | |
21 fi | |
22 if grep -q -F "already exist" $DIR/.fetchdb.log | |
23 then | |
24 echo "repository alredy exists, updating..." | |
25 cd $DIR/re_databases | |
26 git pull && ln -f -s $DIR/re_databases/* $DIR/databases/ && find . -type f -exec touch {} + | |
27 fi | |
28 | |
29 fi | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 |