From a8960162daf2fee5955732def8862aa60bf6bf0b 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: Sun, 10 Jul 2016 16:19:23 +0000 Subject: Adds pseudo-build step `diff.' --- pkg.build | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pkg.build') diff --git a/pkg.build b/pkg.build index 03309d87..6d44e3a3 100644 --- a/pkg.build +++ b/pkg.build @@ -3,6 +3,21 @@ # parse_with_pkg_name ${SCRIPT_FNAME%[0-9][0-9]*} ${2} ${PKG_BUILD_NAMES}; +if [ "${ARG_RESTART_SCRIPT_AT}" = diff ]; then + printf "" > ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local.patch.new; + for __ in $(find ${PKG_SUBDIR} -name \*.orig); do + if [ -e ${__%.orig} ]; then + echo diff -Nru ${__} ${__%.orig}; + set +o errexit; diff -Nru ${__} ${__%.orig} \ + >> ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local.patch.new; __=${?}; set -o errexit; + if [ ${__} -ge 2 ]; then + exit 1; + fi; + fi; + done; + ls -la ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local.patch.new; + exit 0; +fi; if ! is_build_script_done fetch; then if test_cmd pkg_${PKG_NAME}_fetch; then pkg_${PKG_NAME}_fetch; -- cgit v1.2.3