summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-05 03:03:24 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-05 03:05:56 +0100
commit0981c390f8470c8186fd6821635b2f4eb07f689d (patch)
tree6531ada9ed9fd1b9a585fcaa457cd229fb9ef46b /subr
parent5cd113ccb15fc0bf7c1c8db9ec06af06ccd81fd9 (diff)
downloadmidipix_build-0981c390f8470c8186fd6821635b2f4eb07f689d.tar.bz2
midipix_build-0981c390f8470c8186fd6821635b2f4eb07f689d.tar.xz
build.sh, subr/{build,mode_check_updates}.subr: general cleanup.
Diffstat (limited to 'subr')
-rw-r--r--subr/build.subr14
-rw-r--r--subr/mode_check_updates.subr5
2 files changed, 17 insertions, 2 deletions
diff --git a/subr/build.subr b/subr/build.subr
index a1009c2b..bd2e2581 100644
--- a/subr/build.subr
+++ b/subr/build.subr
@@ -29,6 +29,18 @@ set_env_vars_with_sep() {
done; unset _sevws_sep; pop_IFS;
};
+lfilter() {
+ _lf_list="${1}"; _lf_filter="${2}"; _lf_lnew="";
+ for _lf_litem in ${_lf_list}; do
+ for _lf_lfilter in ${_lf_filter}; do
+ if [ "${_lf_lfilter}" = "${_lf_litem}" ]; then
+ _lf_lnew="${_lf_lnew:+${_lf_lnew} }${_lf_litem}"; break;
+ fi;
+ done;
+ done;
+ echo ${_lf_lnew}; unset _lf_list _lf_filter _lf_lnew _lf_litem _lf_lfilter;
+};
+
log_msg() {
_lm_lvl=${1}; shift;
if [ "${_lm_lvl#v}" != "${_lm_lvl}" ]\
@@ -196,7 +208,7 @@ parse_with_pkg_name() {
unset _pwpn_pkg_name_uc;
log_msg failexit "Error: package \`${PKG_NAME}' missing in build.vars.";
else
- for _pwpn_vname in ${PKG_BUILD_VARS}; do
+ for _pwpn_vname in PREFIX ${PKG_BUILD_VARS}; do
if [ -n "$(get_var_unsafe DEFAULT_${_pwpn_vname})" ]; then
set_var_unsafe PKG_${_pwpn_vname} "$(get_var_unsafe DEFAULT_${_pwpn_vname})";
fi;
diff --git a/subr/mode_check_updates.subr b/subr/mode_check_updates.subr
index cc07b67e..312b81e0 100644
--- a/subr/mode_check_updates.subr
+++ b/subr/mode_check_updates.subr
@@ -50,7 +50,10 @@ modep_check_cpu_get_version() {
};
mode_check_pkg_updates() {
- cu_name="${1}"; cu_version="${2}"; cu_url="${3}"; cu_url_type="${4}";
+ cu_name="${1}"; cu_NAME="${2}";
+ cu_version="$(get_var_unsafe PKG_${cu_NAME}_VERSION)";
+ cu_url="$(get_var_unsafe PKG_${cu_NAME}_URL)";
+ cu_url_type="$(get_var_unsafe PKG_${cu_NAME}_URL_TYPE)";
. vars/check_updates.vars;
if match_list "${CHECK_UPDATES_SKIP}" " " "${cu_name}"; then
log_msg vnfo "Skipping \`${cu_name}' (set in \${CHECK_UPDATES_SKIP}.)";