diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-06-02 10:12:18 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-06-02 10:12:18 +0100 |
commit | 7bfc1ebbef02a5920ba49209b3ee77cf63f5d3dd (patch) | |
tree | 58a63648d03c320ddf925874bf33a61f876b163a | |
parent | 522027077c1d865cac5be24762842441d5748630 (diff) | |
download | midipix_build-7bfc1ebbef02a5920ba49209b3ee77cf63f5d3dd.tar.bz2 midipix_build-7bfc1ebbef02a5920ba49209b3ee77cf63f5d3dd.tar.xz |
subr/rtl_install.subr: correctly return failure given rtl_fileop() failure.
-rw-r--r-- | subr/rtl_install.subr | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/subr/rtl_install.subr b/subr/rtl_install.subr index b57c68f2..be940cd9 100644 --- a/subr/rtl_install.subr +++ b/subr/rtl_install.subr @@ -20,14 +20,18 @@ rtl_install() { if [ -e "${_ln_fname}" ]; then rtl_fileop rm "${_ln_fname}"; fi; - rtl_fileop ln_symbolic "${_ln_target}" "${_ln_fname}"; + if ! rtl_fileop ln_symbolic "${_ln_target}" "${_ln_fname}"; then + return 1; + fi; ;; /=*) _mkdir_fname="${1#/=}"; if [ "${_mkdir_fname#/}" = "${_mkdir_fname}" ]; then _mkdir_fname="${_prefix:+${_prefix}/}${_mkdir_fname}"; fi; - rtl_fileop mkdir "${_mkdir_fname}"; + if ! rtl_fileop mkdir "${_mkdir_fname}"; then + return 1; + fi; ;; *) _file_fname_src="${1%=*}"; @@ -38,7 +42,9 @@ rtl_install() { if [ "${_file_fname_dst#/}" = "${_file_fname_dst}" ]; then _file_fname_dst="${_prefix:+${_prefix}/}${_file_fname_dst}"; fi; - rtl_fileop cp "${_file_fname_src}" "${_file_fname_dst}"; + if ! rtl_fileop cp "${_file_fname_src}" "${_file_fname_dst}"; then + return 1; + fi; ;; esac; shift; done; |