config/functions: roll check_path into check_config

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2018-10-23 20:24:25 +00:00
parent 8d8ca6cee7
commit 4fe54cff72
2 changed files with 14 additions and 14 deletions

View File

@ -456,19 +456,6 @@ init_package_cache() {
fi fi
} }
check_path() {
local dashes="===========================" path_err_msg
if [ "${PWD##/usr}" != "${PWD}" ]; then
path_err_msg="\n $dashes$dashes$dashes"
path_err_msg="${path_err_msg}\n ERROR: Detected building inside /usr"
path_err_msg="${path_err_msg}\n $dashes$dashes$dashes"
path_err_msg="${path_err_msg}\n This is not supported with our buildsystem."
path_err_msg="${path_err_msg}\n Please use another dir (for example your \$HOME) to build ${DISTRONAME}"
die "${path_err_msg}"
fi
}
load_build_config() { load_build_config() {
if [ -d "${1}" -a -f ${1}/.build.conf ]; then if [ -d "${1}" -a -f ${1}/.build.conf ]; then
source ${1}/.build.conf source ${1}/.build.conf
@ -486,6 +473,19 @@ save_build_config() {
done done
} }
check_path() {
local dashes="===========================" path_err_msg
if [ "${PWD##/usr}" != "${PWD}" ]; then
path_err_msg="\n $dashes$dashes$dashes"
path_err_msg="${path_err_msg}\n ERROR: Detected building inside /usr"
path_err_msg="${path_err_msg}\n $dashes$dashes$dashes"
path_err_msg="${path_err_msg}\n This is not supported with our buildsystem."
path_err_msg="${path_err_msg}\n Please use another dir (for example your \$HOME) to build ${DISTRONAME}"
die "${path_err_msg}"
fi
}
check_distro() { check_distro() {
local dashes="===========================" distro_err_msg local dashes="===========================" distro_err_msg
if [ -z "${DISTRO}" -o ! -d "${DISTRO_DIR}/${DISTRO}" ]; then if [ -z "${DISTRO}" -o ! -d "${DISTRO_DIR}/${DISTRO}" ]; then
@ -557,6 +557,7 @@ check_arch() {
} }
check_config() { check_config() {
check_path
check_distro check_distro
check_project check_project
check_device check_device

View File

@ -95,7 +95,6 @@ fi
[ -z "${_DEBUG_DEPENDS_LIST+x}" ] && set_debug_depends [ -z "${_DEBUG_DEPENDS_LIST+x}" ] && set_debug_depends
check_path
check_config check_config
. config/graphic . config/graphic