summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2017-09-06 16:32:03 +0200
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2017-09-06 16:32:03 +0200
commit90afa29f821b263e5070fdc30d7096519720d017 (patch)
tree65ea725a800dcc338b9ea1630b56faff359b7ede /subr
parent378facbd9fd64c357a7a38c0130893e3b807ff71 (diff)
downloadmidipix_build-90afa29f821b263e5070fdc30d7096519720d017.tar.bz2
midipix_build-90afa29f821b263e5070fdc30d7096519720d017.tar.xz
subr/pkg_{install_pre,strip}.subr: always check for -e ${...}.
Diffstat (limited to 'subr')
-rw-r--r--subr/pkg_install_pre.subr6
-rw-r--r--subr/pkg_strip.subr3
2 files changed, 6 insertions, 3 deletions
diff --git a/subr/pkg_install_pre.subr b/subr/pkg_install_pre.subr
index f2273ba4..7ab8a9e2 100644
--- a/subr/pkg_install_pre.subr
+++ b/subr/pkg_install_pre.subr
@@ -4,10 +4,12 @@
pkg_install_pre() {
if [ "${PKG_NAME%flavour_minipix}" != "${PKG_NAME}" ] \
- && [ ${ARG_DEBUG_MINIPIX:-0} -eq 0 ]; then
+ && [ ${ARG_DEBUG_MINIPIX:-0} -eq 0 ] \
+ && [ -e "${PREFIX_MINIPIX}" ]; then
find "${PREFIX_MINIPIX}" -perm /a=x \
\( -type f -or -type l \) > "${WORKDIR}/.stat_minipix.old";
- elif [ "${BUILD}" = release ]; then
+ elif [ "${BUILD}" = release ] \
+ && [ -e "${PREFIX_NATIVE}/bin" ]; then
find "${PREFIX_NATIVE}/bin" -perm /a=x \
\( -type f -or -type l \) > "${WORKDIR}/.stat_native.old";
fi;
diff --git a/subr/pkg_strip.subr b/subr/pkg_strip.subr
index e0b2bf12..9f6ce31f 100644
--- a/subr/pkg_strip.subr
+++ b/subr/pkg_strip.subr
@@ -5,7 +5,8 @@
pkgp_strip_tree() {
local _tree_old="${1}" _tree_root="${2}";
local _tree_new="${_tree_old%.*}.new" _tree_diff="${_tree_old%.*}.diff";
- if [ ! -e "${_tree_old}" ]; then
+ if [ ! -e "${_tree_old}" ] \
+ || [ ! -e "${_tree_root}" ]; then
return;
fi;
find "${_tree_root}" -perm /a=x \( -type f -or -type l \) > "${_tree_new}";