make variables local

This commit is contained in:
belliash 2012-01-02 13:06:07 +01:00
parent c8e7918978
commit fa525ebe3e
1 changed files with 5 additions and 5 deletions

View File

@ -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