From c0a0e3c079761f14572be09e37b22f08b6181dfd Mon Sep 17 00:00:00 2001 From: dukun Date: Thu, 16 Nov 2017 17:43:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/install-local.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/install-local.sh b/bin/install-local.sh index 22141870..eb1a9c44 100755 --- a/bin/install-local.sh +++ b/bin/install-local.sh @@ -5,6 +5,7 @@ #!/usr/bin/env bash typeset SANDBOX_INSTALL_PREFIX +typeset DEFAULT_SANDBOX_INSTALL_PREFIX="${HOME}/.opt" # exit shell with err_code # $1 : err_code @@ -17,7 +18,7 @@ exit_on_err() # display usage function usage() { -echo ' +echo " usage: ${0} [h] [l:] -h : help @@ -25,9 +26,9 @@ usage: ${0} [h] [l:] -p : install local path - Install local path in this compute. Default install local path is ${SANDBOX_INSTALL_PREFIX} + Install local path in this compute. Default install local PATH=${DEFAULT_SANDBOX_INSTALL_PREFIX} -' +" } # the sandbox main function @@ -49,7 +50,7 @@ function main() { # if not appoint the install local, default is ${HOME}/.opt if [[ -z ${SANDBOX_INSTALL_PREFIX} ]]; then - SANDBOX_INSTALL_PREFIX="${HOME}/.opt" + SANDBOX_INSTALL_PREFIX=${DEFAULT_SANDBOX_INSTALL_PREFIX} fi # check permission