-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetch-ensemblNN
More file actions
executable file
·46 lines (34 loc) · 1.09 KB
/
fetch-ensemblNN
File metadata and controls
executable file
·46 lines (34 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/bash
# For regex match, {,globs}
set -e
VSN=$1
[[ "$VSN" =~ ^[0-9][0-9][0-9]? ]] || {
echo "Syntax: $0 <nn>
Create ./ensembl-branch-nn/ from cvs.sanger.ac.uk
REPLACING any existing directory of that name,
stripping the .git/ directories afterwards,
then committing to Git.
" >&2
exit 1
}
# Check that we will party on the directory in the correct place
[ "$0" = "./fetch-ensemblNN" ] && [ -f "$PWD/fetch-ensemblNN" ] || {
echo "$0 aborting: run from webvm-deps/ clone with ./fetch-ensemblNN" >&2
exit 3
}
ENSDIR="$PWD/ensembl-branch-$VSN"
git diff --cached --quiet --exit-code && git diff --quiet --exit-code || {
echo "$0 aborting: Working copy is not clean" >&2
exit 2
}
[ -d $ENSDIR ] || existed=creat
rm -rf $ENSDIR
mkdir $ENSDIR
echo "== webvm-git fetch ensembl* (needs standard team-tools PATH)"
for reponame in ensembl{,-compara,-variation,-funcgen}; do
echo "=== fetch $reponame"
_anacode_build_lib__ensembl $reponame "$ENSDIR" "$VSN"
done
echo "== webvm-git add & commit"
git add -A $ENSDIR
git commit -q -m "ran $( basename $0 ) - ${existed:-updat}ed $VSN"