reGen2 Linux Release Metatool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

32 lines
1.0 KiB

#!/bin/bash
# Copyright 2010-2011, Asio Software Technologies
# Distributed under the terms of the GNU General Public License v3
#-------------------------------------------------------------------------------
# Creates all components of the specified directories
# Parameters: %directory%
#-------------------------------------------------------------------------------
function makeDirectory() {
local OUTPUT=$(install -d "${@}" 2>&1)
local RESULT=${?}
if [[ ${RESULT} -ne 0 ]]; then
logOutput "${OUTPUT}"
fi
return ${RESULT}
}
#-------------------------------------------------------------------------------
# Creates a symbolic link between to files in specified target directory
# Parameters: %source% %target%
#-------------------------------------------------------------------------------
function makeLink() {
local DESTDIR="${2%/*}"
[[ ! -d ${DESTDIR} ]] && makeDirectory "${DESTDIR}"
local OUTPUT=$(ln -sfn "${1}" "${2}" 2>&1)
local RESULT=${?}
if [[ ${RESULT} -ne 0 ]]; then
logOutput "${OUTPUT}"
fi
return ${RESULT}
}