Skip to content

Commit

Permalink
fix bad command if check
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jul 25, 2020
1 parent a3b8d33 commit 6db86a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ REPO=${1:-"ktmeaton/plague-phylogeography"}
STEPS="5"
# Get plague-phylogeography conda name
PHYLO_CONDA_ENV="plague-phylogeography-0.1.4dev"
if [[ `-f ~/.nextflow/assets/${REPO}/environment.yaml` ]]; then
if [[ -f ~/.nextflow/assets/${REPO}/environment.yaml ]]; then
PHYLO_CONDA_ENV=`grep "name:" ~/.nextflow/assets/${REPO}/environment.yaml | \
cut -d " " -f 2`
fi


# Remove the plague-phylogeography pipeline and conda environment
echo "[1/${STEPS}] Removing the plague-phylogeography nextflow pipeline."
if [[ `-f ~/.nextflow/assets/${REPO}/environment.yaml` ]]; then
if [[ -f ~/.nextflow/assets/${REPO}/environment.yaml ]]; then
PHYLO_CONDA_ENV=`grep "name:" ~/.nextflow/assets/${REPO}/environment.yaml | \
cut -d " " -f 2`
nextflow drop ${REPO}
Expand All @@ -31,7 +31,7 @@ fi

# Remove the nfcore/eager pipeline
echo "[3/${STEPS}] Removing the nf-core/eager nextflow pipeline."
if [[ `-f ~/.nextflow/assets/nf-core/eager/environment.yaml` ]]; then
if [[ -f ~/.nextflow/assets/nf-core/eager/environment.yaml ]]; then
EAGER_CONDA_ENV=`grep "name:" ~/.nextflow/assets/nf-core/eager/environment.yaml | \
cut -d " " -f 2`
nextflow drop nf-core/eager
Expand All @@ -43,7 +43,7 @@ fi

# Remove the nextstrain conda env
echo "[5/${STEPS}] Removing the nextstrain conda environment."
if [[ `-f ~/.nextflow/assets/${REPO}/config/nextstrain.yaml` ]]; then
if [[ -f ~/.nextflow/assets/${REPO}/config/nextstrain.yaml ]]; then
NEXTSTRAIN_CONDA_ENV=`grep "name:" ~/.nextflow/assets/${REPO}/config/nextstrain.yaml | \
cut -d " " -f 2`
conda remove -n ${NEXTSTRAIN_CONDA_ENV} --all
Expand Down

0 comments on commit 6db86a2

Please sign in to comment.