summaryrefslogtreecommitdiffhomepage
path: root/vars
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-09 10:43:56 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-09 10:43:56 +0000
commit97a26084c0f2425e8099f591406f0d98950aa593 (patch)
treed61b3abe0fbb7ce8f510b0071d6eef3b8d40f526 /vars
parent098dc78a578eef2a1fb872beaf21af4f9d651128 (diff)
downloadmidipix_build-97a26084c0f2425e8099f591406f0d98950aa593.tar.bz2
midipix_build-97a26084c0f2425e8099f591406f0d98950aa593.tar.xz
vars/invariants_minipix.vars: predicate copying files on existence thereof.
Diffstat (limited to 'vars')
-rw-r--r--vars/invariants_minipix.vars28
1 files changed, 17 insertions, 11 deletions
diff --git a/vars/invariants_minipix.vars b/vars/invariants_minipix.vars
index f05e367d..2f00ec21 100644
--- a/vars/invariants_minipix.vars
+++ b/vars/invariants_minipix.vars
@@ -23,31 +23,36 @@ pkg_invariants_minipix_all() {
fi;
done;
for _fname in clear reset tset; do
- if pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then
+ if [ -e "${PREFIX_NATIVE}/bin/${_fname}" ]\
+ && pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then
ex_rtl_fileop cp_follow "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin";
fi;
done;
- for _pname in $(find "${PREFIX}/minipix_dist/bin" \
+ for _pname in $([ -e "${PREFIX}/minipix_dist/bin" ] && 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";
fi;
done;
- for _fname in libc.so libcrypto.so.45 libexpat.so.1 liblzma.so.5 libmagic.so.1 \
- libncurses.so.6 libncursesw.so.6 libpcre.so.1 libperk.so.0 \
- libpsxscl.so libpython2.7.so.1 libreadline.so.7 libssl.so.47 \
- libu16ports.so.0 libtinfo.so.6 libtinfow.so.6 libunistring.so.2 \
+ for _fname in libc.so libcrypto.so.45 libexpat.so.1 liblzma.so.5 libmagic.so.1 \
+ libncurses.so.6 libncursesw.so.6 libpcre.so.1 libperk.so.0 \
+ libpsxscl.so libpython2.7.so.1 libreadline.so.7 libssl.so.47 \
+ libu16ports.so.0 libtinfo.so.6 libtinfow.so.6 libunistring.so.2 \
libuuid.so.1; do
- if pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then
- ex_rtl_fileop cp_follow \
+ if [ -e "${PREFIX_NATIVE}/lib/${_fname}" ]\
+ && pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then
+ ex_rtl_fileop cp_follow \
"${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin";
fi;
done;
for _dname in lib/python2.7 share/gdb; do
- tar -C "${PREFIX}/minipix_dist" -cpf - "${_dname}" | tar -C "${PREFIX_MINIPIX}" -xpf -;
+ if [ -d "${PREFIX}/minipix_dist/${_dname}" ]; then
+ tar -C "${PREFIX}/minipix_dist" -cpf - "${_dname}" | tar -C "${PREFIX_MINIPIX}" -xpf -;
+ fi;
done;
for _fname in nano vim; do
- if pkgp_invariants_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then
+ if [ -e "${PREFIX}/minipix_dist/share/${_fname}" ]\
+ && pkgp_invariants_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then
ex_rtl_fileop cp_follow "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share";
fi;
done;
@@ -62,7 +67,8 @@ pkg_invariants_minipix_all() {
if [ ! -e "${PREFIX_MINIPIX}/${_dname}" ]; then
ex_rtl_fileop mkdir "${PREFIX_MINIPIX}/${_dname}";
fi;
- if pkgp_invariants_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then
+ if [ -e "${PREFIX_NATIVE}/${_dname}/${_fname}" ]\
+ && 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;