-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e597590
commit ceb5eec
Showing
1 changed file
with
14 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash -eE | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2013, Paolo Di Tommaso <[email protected]> | ||
# | ||
|
@@ -28,9 +28,7 @@ function get() { | |
fi | ||
|
||
printf "Downloading nextflow dependencies. It may require some seconds, please wait .. " | ||
set +e | ||
$GET; status=$? | ||
set -e | ||
printf "\r\033[K" | ||
if [ $status -ne 0 ]; then | ||
echo "Error: cannot download nextflow required file -- make sure you can connect the internet" | ||
|
@@ -46,14 +44,14 @@ function get() { | |
} | ||
|
||
function install() { | ||
if [ "$(uname)" = 'Darwin' ]; then tmpfile=$(mktemp $PWD/XXXXX); | ||
else tmpfile=$(mktemp -t XXXXX --tmpdir=$PWD); | ||
if [ "$(uname)" = 'Darwin' ]; then tmpfile=$(mktemp $PWD/XXXXX) || exit $? | ||
else tmpfile=$(mktemp -t XXXXX --tmpdir=$PWD) || exit $? | ||
fi | ||
|
||
get "http://nextflow.io/releases/latest/nextflow" "$tmpfile" "$1" | ||
mv $tmpfile $1; | ||
chmod +x $1 | ||
bash $1 -download | ||
get "http://nextflow.io/releases/latest/nextflow" "$tmpfile" "$1" || exit $? | ||
mv $tmpfile $1 || exit $? | ||
chmod +x $1 || exit $? | ||
bash $1 -download || exit $? | ||
echo '' | ||
echo -e $'Nextflow installation completed. Please note:' | ||
echo -e $'- the executable file \'nextflow\' has been created in this folder' | ||
|
@@ -64,8 +62,10 @@ function install() { | |
# check self-install | ||
if [ "$0" = "bash" ] || [ "$0" = "/bin/bash" ]; then | ||
if [ -d nextflow ]; then | ||
echo "The install procedure needs to create a file named 'nextflow' in this folder, but a directory with this name already exists." | ||
echo "Please renamed/delete that directory, or execute the Nextflow install procedure in another folder." | ||
echo 'Please note:' | ||
echo "- The install procedure needs to create a file named 'nextflow' in this folder, but a directory with this name already exists." | ||
echo "- Please renamed/delete that directory, or execute the Nextflow install procedure in another folder." | ||
echo '' | ||
exit 1 | ||
fi | ||
install "$PWD/nextflow" | ||
|
@@ -87,8 +87,8 @@ for opt in "$@"; do | |
hazelcast) | ||
NXF_PACK='hz';; | ||
-download) | ||
rm -rf $NXF_HOME/framework/$NXF_VER | ||
$0 -version | ||
rm -rf $NXF_HOME/framework/$NXF_VER || exit $? | ||
$0 -version || exit $? | ||
exit 0;; | ||
-self-update|self-update) | ||
install $0; | ||
|
@@ -111,7 +111,7 @@ if [ ! -f "$NXF_BIN" ]; then | |
exit 1 | ||
fi | ||
|
||
mkdir -p $NXF_PATH | ||
mkdir -p $NXF_PATH || exit $? | ||
get "$NXF_URL" "$NXF_BIN" | ||
fi | ||
|
||
|