From 2bc5c311ad0aab4ad87c828ff728249c4d9a887b Mon Sep 17 00:00:00 2001 From: Folgert Karsdorp Date: Sat, 19 Jul 2014 10:50:38 +0200 Subject: [PATCH] little more safe --- start-osx.command | 14 +++++++++----- start-unix.sh | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/start-osx.command b/start-osx.command index 169c7c1..f87bc80 100755 --- a/start-osx.command +++ b/start-osx.command @@ -1,11 +1,15 @@ #!/bin/bash -source activate py34 - cd "$(dirname "$0")" -which ipython3 + +source activate py34 if [[ $? == 0 ]]; then - ipython3 notebook --matplotlib=inline -else ipython notebook --matplotlib=inline +else + which ipython3 + if [[ $? == 0 ]]; then + ipython3 notebook --matplotlib=inline + else + ipython notebook --matplotlib=inline + fi fi diff --git a/start-unix.sh b/start-unix.sh index 3b8880f..f87bc80 100755 --- a/start-unix.sh +++ b/start-unix.sh @@ -1,11 +1,15 @@ #!/bin/bash -source activate py34 - cd "$(dirname "$0")" -which ipython3 + +source activate py34 if [[ $? == 0 ]]; then - ipython3 notebook --matploblib=inline -else ipython notebook --matplotlib=inline +else + which ipython3 + if [[ $? == 0 ]]; then + ipython3 notebook --matplotlib=inline + else + ipython notebook --matplotlib=inline + fi fi