diff options
Diffstat (limited to 'dist')
-rw-r--r-- | dist/dist_digest.dist | 23 | ||||
-rw-r--r-- | dist/dist_minipix.dist | 51 | ||||
-rw-r--r-- | dist/dist_zipdist.dist | 64 |
3 files changed, 65 insertions, 73 deletions
diff --git a/dist/dist_digest.dist b/dist/dist_digest.dist deleted file mode 100644 index 335b63e7..00000000 --- a/dist/dist_digest.dist +++ /dev/null @@ -1,23 +0,0 @@ -# -# set +o errexit -o noglob is assumed. -# - -pkg_dist_digest_all() { - local _fname=""; - if rtl_lmatch "${ARG_DIST}" "tbz2" "," \ - || rtl_lmatch "${ARG_DIST}" "tgz" "," \ - || rtl_lmatch "${ARG_DIST}" "txz" ","; then - rtl_log_msg info "Compiling SHA256 sums..."; - if [ -e "${PREFIX}/SHA256SUMS" ]; then - rtl_fileop mv "${PREFIX}/SHA256SUMS" "${PREFIX}/SHA256SUMS.last"; - fi; - (cd "${PREFIX}"; - for _fname in $(find "${PREFIX_NATIVE#${PREFIX}/}" -type f -perm /a=x \ - \( -path "${PREFIX_NATIVE#${PREFIX}/}/bin/*" -or \ - -path "${PREFIX_NATIVE#${PREFIX}/}/lib/*" \)); do - sha256sum "${_fname}"; - done > "${PREFIX}/SHA256SUMS"); - fi; -}; - -# vim:filetype=sh diff --git a/dist/dist_minipix.dist b/dist/dist_minipix.dist index 04267d3b..728f14df 100644 --- a/dist/dist_minipix.dist +++ b/dist/dist_minipix.dist @@ -18,20 +18,23 @@ pkg_dist_minipix_all() { local _dname="" _fname="" _pname=""; if rtl_lmatch "${ARG_DIST}" "minipix" ","; then for _dname in "${PREFIX_MINIPIX}/bin" "${PREFIX_MINIPIX}/share"; do - if [ ! -e "${_dname}" ]; then - rtl_fileop mkdir "${_dname}"; + if [ ! -e "${_dname}" ]\ + && ! rtl_fileop mkdir "${_dname}"; then + return 1; fi; done; for _fname in clear reset tset; do if [ -e "${PREFIX_NATIVE}/bin/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then - rtl_fileop cp_follow "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; + && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"\ + && ! rtl_fileop cp_follow "${PREFIX_NATIVE}/bin/${_fname}" "${PREFIX_MINIPIX}/bin"; then + return 1; fi; done; 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_dist_minipix_is_newer "${_pname}" "${PREFIX_MINIPIX}/bin"; then - rtl_fileop cp_follow "${_pname}" "${PREFIX_MINIPIX}/bin"; + if pkgp_dist_minipix_is_newer "${_pname}" "${PREFIX_MINIPIX}/bin"\ + && ! rtl_fileop cp_follow "${_pname}" "${PREFIX_MINIPIX}/bin"; then + return 1; fi; done; for _fname in libc.so libcrypto.so.45 libexpat.so.1 liblzma.so.5 libmagic.so.1 \ @@ -40,36 +43,42 @@ pkg_dist_minipix_all() { libu16ports.so.0 libtinfo.so.6 libtinfow.so.6 libunistring.so.2 \ libuuid.so.1; do if [ -e "${PREFIX_NATIVE}/lib/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then - rtl_fileop cp_follow \ - "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; + && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"\ + && ! rtl_fileop cp_follow "${PREFIX_NATIVE}/lib/${_fname}" "${PREFIX_MINIPIX}/bin"; then + return 1; fi; done; for _dname in lib/python2.7 share/gdb; do - if [ -d "${PREFIX}/minipix_dist/${_dname}" ]; then - tar -C "${PREFIX}/minipix_dist" -cpf - "${_dname}" | tar -C "${PREFIX_MINIPIX}" -xpf -; + if [ -d "${PREFIX}/minipix_dist/${_dname}" ]\ + && ! tar -C "${PREFIX}/minipix_dist" -cpf - "${_dname}" | tar -C "${PREFIX_MINIPIX}" -xpf -; then + return 1; fi; done; for _fname in nano vim; do if [ -e "${PREFIX}/minipix_dist/share/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then - rtl_fileop cp_follow "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; + && pkgp_dist_minipix_is_newer "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"\ + && ! rtl_fileop cp_follow "${PREFIX}/minipix_dist/share/${_fname}" "${PREFIX_MINIPIX}/share"; then + return 1; fi; done; - if [ ! -L "${PREFIX_MINIPIX}/share/nanorc" ]; then - rtl_fileop ln_symbolic "nano/nanorc.nanorc" "${PREFIX_MINIPIX}/share/nanorc"; + if [ ! -L "${PREFIX_MINIPIX}/share/nanorc" ]\ + && ! rtl_fileop ln_symbolic "nano/nanorc.nanorc" "${PREFIX_MINIPIX}/share/nanorc"; then + return 1; fi; - if [ ! -L "${PREFIX_MINIPIX}/share/vimrc" ]; then - rtl_fileop ln_symbolic "vim/vim74/vimrc_example.vim" "${PREFIX_MINIPIX}/share/vimrc"; + if [ ! -L "${PREFIX_MINIPIX}/share/vimrc" ]\ + && ! rtl_fileop ln_symbolic "vim/vim74/vimrc_example.vim" "${PREFIX_MINIPIX}/share/vimrc"; then + return 1; fi; for _fname in putty putty-256color screen screen-256color xterm xterm-256color; do _dname="share/terminfo/${_fname%${_fname#[a-zA-Z]}}"; - if [ ! -e "${PREFIX_MINIPIX}/${_dname}" ]; then - rtl_fileop mkdir "${PREFIX_MINIPIX}/${_dname}"; + if [ ! -e "${PREFIX_MINIPIX}/${_dname}" ]\ + && ! rtl_fileop mkdir "${PREFIX_MINIPIX}/${_dname}"; then + return 1; fi; if [ -e "${PREFIX_NATIVE}/${_dname}/${_fname}" ]\ - && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then - rtl_fileop cp_follow "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; + && pkgp_dist_minipix_is_newer "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"\ + && ! rtl_fileop cp_follow "${PREFIX_NATIVE}/${_dname}/${_fname}" "${PREFIX_MINIPIX}/${_dname}"; then + return 1; fi; done; fi; diff --git a/dist/dist_zipdist.dist b/dist/dist_zipdist.dist index 36c45892..571dc0ce 100644 --- a/dist/dist_zipdist.dist +++ b/dist/dist_zipdist.dist @@ -13,35 +13,41 @@ pkg_dist_zipdist_all() { fi; done; _dist_fname="${DEFAULT_ZIPDIST_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.zip"; - if [ -e "${BUILD_WORKDIR}/zipdist" ]; then - rtl_fileop rm "${BUILD_WORKDIR}/zipdist"; - fi; - rtl_fileop mkdir "${BUILD_WORKDIR}/zipdist"; - "${BUILD_WORKDIR}/mpackage/mpackage.sh" \ - --defroot="${DEFAULT_ZIPDIST_DEFROOT}" \ - --flysyms \ - --minroot="${PREFIX_MINIPIX}" \ - --objroot="${BUILD_WORKDIR}" \ - --pkgroot="${BUILD_WORKDIR}/zipdist/pkgroot" \ - --product=Midipix \ - --subset="${_pkglist_fname}" \ - --symbols \ - --sysroot="${BUILD_WORKDIR}/zipdist/sysroot" \ - --target="${DEFAULT_TARGET}" \ - --tmproot="${BUILD_WORKDIR}/zipdist/tmproot" \ - --zipfile="${PREFIX}/${_dist_fname}"; - echo "msg_pkg dist dist_zipdist Finished building deployable distribution ZIP archive." >&3; - rtl_log_msg info "Finished building deployable distribution ZIP archive."; - if [ -n "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" ]\ - && [ -x "$(which gpg 2>/dev/null)" ]\ - && gpg --list-keys "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" >/dev/null 2>&1; then - echo "msg_pkg dist dist_zipdist Signing deployable distribution ZIP archive..." >&3; - rtl_log_msg info "Signing deployable distribution ZIP archive..."; - gpg --armor --passphrase-file /dev/null \ - --local-user "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" \ - --sign "${PREFIX}/${_dist_fname}"; - echo "msg_pkg dist dist_zipdist Signed deployable distribution ZIP archive." >&3; - rtl_log_msg info "Signed deployable distribution ZIP archive."; + if [ -e "${BUILD_WORKDIR}/zipdist" ]\ + && ! rtl_fileop rm "${BUILD_WORKDIR}/zipdist"; then + return 1; + elif ! rtl_fileop mkdir "${BUILD_WORKDIR}/zipdist"; then + return 1; + elif ! "${BUILD_WORKDIR}/mpackage/mpackage.sh" \ + --defroot="${DEFAULT_ZIPDIST_DEFROOT}" \ + --flysyms \ + --minroot="${PREFIX_MINIPIX}" \ + --objroot="${BUILD_WORKDIR}" \ + --pkgroot="${BUILD_WORKDIR}/zipdist/pkgroot" \ + --product=Midipix \ + --subset="${_pkglist_fname}" \ + --symbols \ + --sysroot="${BUILD_WORKDIR}/zipdist/sysroot" \ + --target="${DEFAULT_TARGET}" \ + --tmproot="${BUILD_WORKDIR}/zipdist/tmproot" \ + --zipfile="${PREFIX}/${_dist_fname}"; then + return 1; + else + echo "msg_pkg dist dist_zipdist Finished building deployable distribution ZIP archive." >&3; + rtl_log_msg info "Finished building deployable distribution ZIP archive."; + if [ -n "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" ]\ + && [ -x "$(which gpg 2>/dev/null)" ]\ + && gpg --list-keys "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" >/dev/null 2>&1; then + echo "msg_pkg dist dist_zipdist Signing deployable distribution ZIP archive..." >&3; + rtl_log_msg info "Signing deployable distribution ZIP archive..."; + if ! gpg --armor --passphrase-file /dev/null \ + --local-user "${DEFAULT_ZIPDIST_SIGN_GPG_KEY}" \ + --sign "${PREFIX}/${_dist_fname}"; then + return 1; + fi; + echo "msg_pkg dist dist_zipdist Signed deployable distribution ZIP archive." >&3; + rtl_log_msg info "Signed deployable distribution ZIP archive."; + fi; fi; fi; }; |