summaryrefslogtreecommitdiffhomepage
path: root/vars
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2019-01-19 14:26:36 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2019-01-19 14:26:36 +0000
commite402f659b8e40a27d6ce64ea1a8f08be9f28c848 (patch)
tree3cd377627f9082a3ee0d13b3eabb46d252bdfcbe /vars
parentf84af6332d7d46223168067326916b504d0ace4d (diff)
downloadmidipix_build-e402f659b8e40a27d6ce64ea1a8f08be9f28c848.tar.bz2
midipix_build-e402f659b8e40a27d6ce64ea1a8f08be9f28c848.tar.xz
vars/invariants_minipix.vars: fix pkgp_invariants_minipix_is_newer() & pathnames.
Diffstat (limited to 'vars')
-rw-r--r--vars/invariants_minipix.vars19
1 files changed, 10 insertions, 9 deletions
diff --git a/vars/invariants_minipix.vars b/vars/invariants_minipix.vars
index 29c75f5c..413ee07f 100644
--- a/vars/invariants_minipix.vars
+++ b/vars/invariants_minipix.vars
@@ -4,9 +4,10 @@
pkgp_invariants_minipix_is_newer() {
local _new_fname="${1}" _new_ts="" _old_dname="${2}" _old_ts="";
- _old_ts="$(stat -c %Y "${_old_dname%%/}/${_new_fname##*/}")";
- _new_ts="$(stat -c %Y "${_new_fname}")";
- if [ "${_new_ts}" > "${_old_ts}" ]; then
+ if ! _old_ts="$(stat -c %Y "${_old_dname%%/}/${_new_fname##*/}" 2>/dev/null)" \
+ || ! _new_ts="$(stat -c %Y "${_new_fname}" 2>/dev/null)"; then
+ return 0;
+ elif [ "${_new_ts}" -gt "${_old_ts}" ]; then
return 0;
else
return 1;
@@ -26,7 +27,7 @@ pkg_invariants_minipix_all() {
ex_rtl_fileop cp_follow "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin";
fi;
done;
- for _pname in $(find "${PREFIX_MINIPIX}/bin" \
+ for _pname in $(find "${PREFIX}/minipix_dist/bin" \
-maxdepth 1 -perm /a=x -type f -and \( -not -name "lib*" \)); do
if pkgp_invariants_minipix_is_newer "${_pname}" "${PREFIX_MINIPIX}/bin"; then
ex_rtl_fileop cp_follow "${_pname}" "${PREFIX_MINIPIX}/bin";
@@ -53,12 +54,12 @@ pkg_invariants_minipix_all() {
ex_rtl_fileop ln_symbolic "vim/vim74/vimrc_example.vim" "${PREFIX_MINIPIX}/share/vimrc";
fi;
for _fname in putty putty-256color screen screen-256color xterm xterm-256color; do
- _dname="${PREFIX_MINIPIX}/share/terminfo/${_fname%${_fname#[a-zA-Z]}}";
- if [ ! -e "${_dname}" ]; then
- ex_rtl_fileop mkdir "${_dname}";
+ _dname="share/terminfo/${_fname%${_fname#[a-zA-Z]}}";
+ if [ ! -e "${PREFIX_MINIPIX}/${_dname}" ]; then
+ ex_rtl_fileop mkdir "${PREFIX_MINIPIX}/${_dname}";
fi;
- if pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/share/terminfo/${_term_letter}/${_fname}" "${_dname}"; then
- ex_rtl_fileop cp_follow "${PREFIX_NATIVE}/share/terminfo/${_term_letter}/${_fname}" "${_dname}";
+ if pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then
+ ex_rtl_fileop cp_follow "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}";
fi;
done;
fi;