Debian Codegraph @

examples/dictionary/gene95/gene-import.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 base_dir=$(dirnamescip-shell system . . dirname. $0)
4
5 if [scip-shell system . . `[`. 1 != $# -a 2 != $# ]; then
6 echoscip-shell system . . echo. "usage: $0 db_path [gene.txt_path]"
7 exit 1
8 fi
9
10 if [scip-shell system . . `[`. -z $2 ]; then
11 dictionary_dir=gene95-dictionary
12 gene_txt=${dictionary_dir}/gene.txt
13 if [scip-shell system . . `[`. ! -f $gene_txt ]; then
14 gene95_tar_gz=gene95.tar.gz
15 wget -O $gene95_tar_gz \
16 http://www.namazu.org/~tsuchiya/sdic/data/gene95.tar.gz
17 mkdirscip-shell system . . mkdir. -p ${dictionary_dir}
18 tarscip-shell system . . tar. xvzf ${gene95_tar_gz} -C ${dictionary_dir}
19 fi
20 else
21 gene_txt=$2
22 fi
23
24 if catscip-shell system . . cat. $gene_txt | ${base_dir}/gene2grn.rb | groonga $1 > /dev/nullscip-shell filesystem . . `/dev/null`.; then
25 echoscip-shell system . . echo. "gene95 data loaded."
26 fi