make variables local
This commit is contained in:
parent
c8e7918978
commit
fa525ebe3e
|
@ -8,8 +8,8 @@
|
||||||
# Parameters: %directory%
|
# Parameters: %directory%
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
function makeDirectory() {
|
function makeDirectory() {
|
||||||
OUTPUT=$(install -d "${@}" 2>&1)
|
local OUTPUT=$(install -d "${@}" 2>&1)
|
||||||
RESULT=${?}
|
local RESULT=${?}
|
||||||
if [[ ${RESULT} -ne 0 ]]; then
|
if [[ ${RESULT} -ne 0 ]]; then
|
||||||
logOutput "${OUTPUT}"
|
logOutput "${OUTPUT}"
|
||||||
fi
|
fi
|
||||||
|
@ -21,10 +21,10 @@ function makeDirectory() {
|
||||||
# Parameters: %source% %target%
|
# Parameters: %source% %target%
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
function makeLink() {
|
function makeLink() {
|
||||||
DESTDIR="${2%/*}"
|
local DESTDIR="${2%/*}"
|
||||||
[[ ! -d ${DESTDIR} ]] && makeDirectory "${DESTDIR}"
|
[[ ! -d ${DESTDIR} ]] && makeDirectory "${DESTDIR}"
|
||||||
OUTPUT=$(ln -sfn "${1}" "${2}" 2>&1)
|
local OUTPUT=$(ln -sfn "${1}" "${2}" 2>&1)
|
||||||
RESULT=${?}
|
local RESULT=${?}
|
||||||
if [[ ${RESULT} -ne 0 ]]; then
|
if [[ ${RESULT} -ne 0 ]]; then
|
||||||
logOutput "${OUTPUT}"
|
logOutput "${OUTPUT}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue