generated from CCBR/CCBR_SnakemakeTemplate
-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.sh
executable file
·38 lines (31 loc) · 919 Bytes
/
install.sh
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
#!/usr/bin/env bash
# usage:
# ./install.sh new/path/to/install
# examples
# ./install.sh .v2.4.0
# /data/CCBR_Pipeliner/Pipelines/CARLISLE/dev/install.sh /data/CCBR_Pipeliner/Pipelines/CARLISLE/.v2.5.0-a
set -euo pipefail
VERSION=$1
mkdir -p ${VERSION}/bin
INSTALL_PATH=$(readlink -f ${VERSION}/bin)
DIRNAME=$(readlink -f $(dirname $0))
if [ -n "$(ls -A $INSTALL_PATH 2>/dev/null)" ]
then
echo "ERROR: directory not empty: ${INSTALL_PATH}"
echo $(ls $INSTALL_PATH)
exit 1
fi
# copy essential files & directories
## carlisle CLI script
cp $DIRNAME/carlisle $INSTALL_PATH/
## all config & workflow scripts;
for subdir in annotation config workflow resources .test
do
mkdir -p ${INSTALL_PATH}/$subdir
cp -r ${DIRNAME}/$subdir/* ${INSTALL_PATH}/$subdir
done
# export path
if [[ ":$PATH:" != *":${INSTALL_PATH}:"* ]];then
export PATH="${PATH}:${INSTALL_PATH}"
fi
echo "${INSTALL_PATH}"