LSHTM_analysis/mk_drug_dirs.sh

35 lines
720 B
Bash
Executable file

#!/bin/bash
# Create a drug directory structure for processing
#
## Structure:
#
# $DATA_DIR/$DRUG/input
#
# $DATA_DIR/$DRUG/output
# |- plots
# |- structure
DATA_DIR=~/git/Data
if [[ $1 == '' ]]; then
echo "Error"
echo "usage: mk-drug-dirs.sh <drug name>";
exit;
else
DRUG=$1
echo Creating directory structure for: $DRUG
if [ -d $DATA_DIR ]
then
echo Doing creation in $DATA_DIR
mkdir -p $DATA_DIR/$DRUG/input
mkdir -p $DATA_DIR/$DRUG/output/plots
mkdir -p $DATA_DIR/$DRUG/output/structure
else
echo "Error: $DATA_DIR does not exist. Did you check it out of git?"
exit
fi
fi