From 9136101731ae802cab27232f3de8879ba99b3962 Mon Sep 17 00:00:00 2001 From: shim_ Date: Mon, 13 Jun 2016 16:13:41 +0200 Subject: [PATCH] chack directory first --- init.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index d7150e3..a94f481 100755 --- a/init.sh +++ b/init.sh @@ -1,6 +1,7 @@ #!/bin/bash -BINARY=/usr/local/rtm/bin/rtm +BINARYDIR=/usr/local/rtm +BINARY=$BINARYDIR/bin/rtm INSTALLER="/cache/install-$RTM_VERSION.sh" function report_loop { @@ -22,7 +23,7 @@ function fetch_installer { fi } -if [ -f "$BINARY" ]; then +if [ -d "$BINARYDIR" && -f $BINARY ]; then report_loop else if [ -f "$INSTALLER" ]; then