From 2b85d0a1de9ec57aab6293163d9885d76a47035c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 25 Feb 2020 17:26:03 +0000 Subject: General cleanup, pt. I. --- subr/build_init.subr | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'subr/build_init.subr') diff --git a/subr/build_init.subr b/subr/build_init.subr index 78b2982f..870128ba 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -56,7 +56,7 @@ buildp_init_args() { }; buildp_init_clean_prefix() { - if ex_rtl_lmatch "${ARG_CLEAN_BUILDS}" , prefix; then + if ex_rtl_lmatch "${ARG_CLEAN_BUILDS}" "prefix" ","; then ex_rtl_log_msg info "-C prefix specified, cleaning prefix..."; for _pname in ${DEFAULT_CLEAR_PREFIX_PATHS}; do ex_rtl_fileop rm "${PREFIX}/${_pname}"; @@ -96,12 +96,12 @@ buildp_init_exec() { buildp_init_files() { local _log_last_fname="" _log_last_ts="" _rc=0; _status="" - ex_rtl_fileop mkdir "${BUILD_DLCACHEDIR}" "${BUILD_WORKDIR}"; - if ex_rtl_lmatch "${ARG_DIST}" , rpm; then - ex_rtl_fileop mkdir "${PREFIX_RPM}"; - fi; - if [ -e "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}" ]; then - _rc=13; _status="Error: another build targeting this architecture and build type is currently in progress."; + if ! ex_rtl_fileop mkdir "${BUILD_DLCACHEDIR}" "${BUILD_WORKDIR}"\ + || ex_rtl_lmatch "${ARG_DIST}" "rpm" ","\ + && ! ex_rtl_fileop mkdir "${PREFIX_RPM}"; then + _rc=13; _status="Error: cannot create build directories."; + elif [ -e "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}" ]; then + _rc=14; _status="Error: another build targeting this architecture and build type is currently in progress."; else touch "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}"; if [ -e "${DEFAULT_BUILD_LOG_FNAME}" ]; then @@ -168,7 +168,7 @@ buildp_init_prereqs() { pgrep pkill printf readlink rm sed seq sha256sum \ sort stat tail tar test touch tr wget xz zip; do if ! which "${_cmd}" >/dev/null 2>&1; then - _cmds_missing="${_cmds_missing:+${_cmds_missing} }${_cmd}"; + _cmds_missing="$(ex_rtl_lconcat "${_cmds_missing}" "${_cmd}")"; fi; done; if [ -n "${_cmds_missing}" ]; then -- cgit v1.2.3