-
Notifications
You must be signed in to change notification settings - Fork 2
/
aspera-env.conf.template
42 lines (34 loc) · 1.5 KB
/
aspera-env.conf.template
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
#
# ASPERA settings for TODO-PROJECT
#
# project-specific settings for aspera uploads from tbi-transfer.
#
# TO LOAD THIS into your current environment, type in your current terminal
# source aspera_env.conf
# NB: you MUST use "source", otherwise the settings are cleaned up again immediately
# and the next scripts can't re-use them.
# With "source", they survive in your (SSH) session until logout.
#
# verify that we are being called by "source"
# based loosely on https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced
# important: use =~ matching to match both login-shells ("-bash") and normal shells ("bash")
if [[ ! $0 =~ 'bash' ]]; then
echo "WRONG INVOCATION! load this file with 'source $BASH_SOURCE'"
echo " otherwise the settings won't 'stick around' in your session"
echo "settings NOT loaded"
else
# which EGA submission box?
export ASPERA_USER="ega-box-TODO"
export ASPERA_SCP_PASS="TODO"
# EBI-specific, probably doesn't have to change
# unless you upload to somewhere not-EGA.
export ASPERA_HOST="fasp.ega.ebi.ac.uk"
# subfolder, if needed, inside the aspera box; default '.' (i.e. toplevel of box)
# but overridable by calling ASPERA_FOLDER="fooFolder/" source THIS_FILE
export ASPERA_FOLDER="${ASPERA_FOLDER:-.}"
# ensure (non-default) subfolders have a slash at the end
if [ ! $ASPERA_FOLDER == '.' ]; then
export ASPERA_FOLDER="${ASPERA_FOLDER/%\/}/"
fi
echo "settings loaded for $ASPERA_USER@$ASPERA_HOST:$ASPERA_FOLDER"
fi