From 5ee71e1fa68e872833e71d770b1065a5592ed738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Tue, 15 Nov 2016 23:49:18 +0100 Subject: build.sh: copy etc/ files after a successful build. --- build.sh | 2 +- scripts/midipix_sh.build | 13 ------------- subr/build.subr | 6 ++++++ subr/tarballs.subr | 4 ++-- 4 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 scripts/midipix_sh.build diff --git a/build.sh b/build.sh index f0a00483..97a7f046 100755 --- a/build.sh +++ b/build.sh @@ -93,7 +93,7 @@ for BUILD_TARGET_LC in $(subst_tgts ${BUILD_TARGETS_META}); do break; fi; done; -do_strip; do_tarballs; fini_build_vars; +copy_etc; do_strip; do_tarballs; fini_build_vars; log_msg info "${BUILD_NFINI} finished, ${BUILD_NSKIP} skipped, and ${BUILD_NFAIL} failed builds in ${BUILD_NBUILT} build script(s)."; log_msg info "Build time: ${BUILD_TIMES_HOURS} hour(s), ${BUILD_TIMES_MINUTES} minute(s), and ${BUILD_TIMES_SECS} second(s)."; fini_build_progress_file; diff --git a/scripts/midipix_sh.build b/scripts/midipix_sh.build deleted file mode 100644 index 94b98d31..00000000 --- a/scripts/midipix_sh.build +++ /dev/null @@ -1,13 +0,0 @@ -# -# . ./build.vars and set -o errexit -o noglob are assumed. -# - -if ! is_build_script_done install; then - (cd ${MIDIPIX_BUILD_PWD}/etc; - tar -cpf - midipix_check.sh midipix.sh README midipix_shortcut.vbs |\ - tar -C ${PREFIX} -xpf -); - chmod +x ${PREFIX}/midipix.sh; - set_build_script_done install finish; -fi; - -# vim:filetype=sh diff --git a/subr/build.subr b/subr/build.subr index 98bd4555..2a9f80fa 100644 --- a/subr/build.subr +++ b/subr/build.subr @@ -63,6 +63,12 @@ clean_prefix() { fi; }; +copy_etc() { + tar -C etc -cpf - midipix_check.sh midipix.sh README midipix_shortcut.vbs |\ + tar -C ${PREFIX} -xpf -; + chmod +x ${PREFIX}/midipix.sh; +}; + create_dirs() { insecure_mkdir ${PREFIX} ${PREFIX_NATIVE} ${PREFIX_CROSS} ${PREFIX_TARGET}/lib ${DLCACHEDIR} ${WORKDIR}; for __ in ${PREFIX}/usr ${PREFIX_NATIVE}/usr; do diff --git a/subr/tarballs.subr b/subr/tarballs.subr index 7bde6642..abcbad07 100644 --- a/subr/tarballs.subr +++ b/subr/tarballs.subr @@ -20,7 +20,7 @@ do_tarball_dist() { tar -cpf - $(find . -maxdepth 2 -mindepth 1 -type d \ -not -path ./native -not -path ./native/lib.bak \ -not -path ./tmp -not -path ./tmp/\*) \ - etc/midipix_shortcut.vbs etc/midipix.sh etc/README |\ + midipix_shortcut.vbs midipix.sh README |\ ${TARBALL_COMPRESS_CMD} ${TARBALL_COMPRESS_ARGS} -c > ${TARBALL_FNAME}; log_msg info "Finished building binary distribution tarball."; if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] &&\ @@ -49,7 +49,7 @@ do_tarball_toolchain() { do_tarball_minipix() { TARBALL_MINIPIX_FNAME=${TARBALL_MINIPIX_FNAME_PREFIX}${BUILD_USER}@${BUILD_HNAME}-${BUILD_DATE_START}.tar.${TARBALL_SUFFIX}; tar -cpf - minipix \ - etc/midipix_shortcut.vbs etc/midipix.sh etc/README |\ + midipix_shortcut.vbs midipix.sh README |\ ${TARBALL_COMPRESS_CMD} ${TARBALL_COMPRESS_ARGS} -c > ${TARBALL_MINIPIX_FNAME}; log_msg info "Finished building binary Minipix distribution tarball."; if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_MINIPIX_SIGN_GPG_KEY}" ] &&\ -- cgit v1.2.3