Skip to content

Commit

Permalink
fix error if folder exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mjoppich committed May 17, 2019
1 parent 3b492e9 commit fdb3548
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
7 changes: 4 additions & 3 deletions install_templates/install_bowtie1.igui
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ mkdir -p "$PROGDIR"
#download and unzip
wget https://sourceforge.net/projects/bowtie-bio/files/bowtie/1.1.2/bowtie-1.1.2-src.zip/download -O "$PROGDIR/$PROG.zip"

if [ -d "$PROGDIR/$PROG" ]; then
echo "Removing Folder $PROGDIR/$PROG"
rm -rf "$PROGDIR/$PROG"
fi


if [ ! -d "$PROGDIR/$PROG" ]; then
unzip -d "$PROGDIR/$PROG" "$PROGDIR/$PROG.zip"
mv "$PROGDIR/$PROG/"*/* "$PROGDIR/$PROG"
fi

cd "$PROGDIR/$PROG"

Expand Down
6 changes: 5 additions & 1 deletion install_templates/install_bowtie2.igui
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ fi
## create progdir
mkdir -p "$PROGDIR"

rm -rf ${PROGDIR}/${PROG}/

if [ -d "$PROGDIR/$PROG" ]; then
echo "Removing Folder $PROGDIR/$PROG"
rm -rf "$PROGDIR/$PROG"
fi

#download and unzip
wget https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.4.3/bowtie2-2.3.4.3-source.zip/download -O "$PROGDIR/$PROG.zip"
Expand Down
5 changes: 3 additions & 2 deletions install_templates/install_bwa.igui
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ fi
## create progdir
mkdir -p "$PROGDIR/"

if [-z ${PROGDIR}/${PROG} ]; then
rm -rf ${PROGDIR}/${PROG}
if [ -d "$PROGDIR/$PROG" ]; then
echo "Removing Folder $PROGDIR/$PROG"
rm -rf "$PROGDIR/$PROG"
fi

#download and unzip
Expand Down
2 changes: 1 addition & 1 deletion install_templates/install_canu.igui
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fi

if [ -d "$PROGDIR/$PROG" ]; then
echo "Removing Folder $PROGDIR/$PROG"
rm -rf $PROGDIR/$PROG
rm -rf "$PROGDIR/$PROG"
fi

## create progdir
Expand Down
5 changes: 5 additions & 0 deletions install_templates/install_glimmer.igui
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ echo "PROGDIRESC $PROGDIRESC"

APPBINARYDIR="${PROGDIRESC}/${PROG}/"

if [ -d "$PROGDIR/$PROG" ]; then
echo "Removing Folder $PROGDIR/$PROG"
rm -rf "$PROGDIR/$PROG"
fi

## create progdir
mkdir -p "$PROGDIR/$PROG"

Expand Down
6 changes: 5 additions & 1 deletion install_templates/install_hisat.igui
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ fi

PROGDIRESC=$(echo $PROGDIR | sed 's/ /\\ /g')


## create progdir
mkdir -p "$PROGDIR"

if [ -d "$PROGDIR/$PROG" ]; then
echo "Removing Folder $PROGDIR/$PROG"
rm -rf "$PROGDIR/$PROG"
fi

#download and unzip
cd "$PROGDIR"
git clone https://github.com/infphilo/hisat2.git $PROG
Expand Down

0 comments on commit fdb3548

Please sign in to comment.