-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_sakura2DB_gtest.sh
More file actions
executable file
·34 lines (30 loc) · 1.17 KB
/
run_sakura2DB_gtest.sh
File metadata and controls
executable file
·34 lines (30 loc) · 1.17 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
#!/bin/bash
##################################################
# sakura2DB test - Complete Genome, virus, phage, only organelle
# Updated by Andrea Ghelfi 2025.4.3
# Part of ddbj_sakura2DB
#
##################################################
function exec_process () {
HOST=`hostname`
echo "This is $HOST"
PGHOST="a012"
echo "This is PGHOST: "$PGHOST
PGDATABASE="g-test"
echo "The current database is: "$PGDATABASE
# # add docker version (v2.1)
# mv ~/temp_sakura2DB/run_sakura2DB.sh ~/temp_sakura2DB/temp_run_sakura2DB.sh
# ACCOUNT=$(whoami)
# DCOMPOSE="/home/w3const/tsunami-exec-compose"
# DEXEC="docker compose -f ${DCOMPOSE}/compose.yaml --env-file ${DCOMPOSE}/.env.${PGDATABASE} --env-file ${DCOMPOSE}/.env.${ACCOUNT} run --rm tsunami-tools"
# awk -v var1="${DEXEC}" '{sub("./sakura2DB", var1 " ./sakura2DB"); print $0}' ~/temp_sakura2DB/temp_run_sakura2DB.sh > ~/temp_sakura2DB/run_sakura2DB.sh
bash ~/temp_sakura2DB/run_sakura2DB.sh
}
EXEC_HOST1="tsunami-guanine"
CURRENT_HOST=$(hostname)
if [[ "$CURRENT_HOST" == "$EXEC_HOST1" ]]; then
echo "Running Sakura2DB ..."
exec_process
else
echo "This is $CURRENT_HOST, please login on tsunami-guanine."
fi