generated from CCBR/CCBR_SnakemakeTemplate
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from CCBR/install-script
Create install script for pipeline usage within ccbrpipeliner
- Loading branch information
Showing
2 changed files
with
53 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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}" |