diff options
author | 2015-11-03 18:14:44 +0000 | |
---|---|---|
committer | 2015-11-03 18:14:44 +0000 | |
commit | 080751d44a081d5a974d7406a9f79b63f67604e8 (patch) | |
tree | 2250d935ec957d6b432acf8def31b8b90520e2b1 | |
parent | 63c837608d735726f5858d856ff33acfefbc38d5 (diff) | |
download | paludis-080751d44a081d5a974d7406a9f79b63f67604e8.tar.gz paludis-080751d44a081d5a974d7406a9f79b63f67604e8.tar.xz |
Proper error handling for dodoc
-rwxr-xr-x | paludis/repositories/e/ebuild/utils/dodoc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/paludis/repositories/e/ebuild/utils/dodoc b/paludis/repositories/e/ebuild/utils/dodoc index c026e6e10..cb4698b3e 100755 --- a/paludis/repositories/e/ebuild/utils/dodoc +++ b/paludis/repositories/e/ebuild/utils/dodoc @@ -52,14 +52,17 @@ for x in "$@"; do if $recurse && [[ -d "${x}" ]] ; then ( export DOCDESTTREE="${DOCDESTTREE}/${x}" - cd "${x}" - ls * >/dev/null 2>&1 && dodoc -r * - ) + if ! cd "${x}" ; then + false + elif ls * >/dev/null 2>&1 ; then + dodoc -r * + fi + ) || ret=2 elif [[ -d "${x}" ]] ; then echo "${0}: ${x} is a directory but we are not recursing" >&2 ret=1 elif [[ -s "${x}" ]]; then - install -m0644 "${x}" "${dir}" + install -m0644 "${x}" "${dir}" || ret=2 elif [[ ! -e "${x}" ]]; then echo "${0}: ${x} does not exist" >&2 ret=2 |