svn commit: r293777 - user/cperciva/freebsd-update-build/scripts
Gleb Smirnoff
glebius at FreeBSD.org
Tue Jan 12 18:06:08 UTC 2016
Author: glebius
Date: Tue Jan 12 18:06:07 2016
New Revision: 293777
URL: https://svnweb.freebsd.org/changeset/base/293777
Log:
Adjust script removing .orig files and empty files:
- Adopt the regexp to cleaned patches, that don't have
diff or subversion header.
- Switch from awk to sed, due to bugs in awk regexps.
Modified:
user/cperciva/freebsd-update-build/scripts/build.subr
Modified: user/cperciva/freebsd-update-build/scripts/build.subr
==============================================================================
--- user/cperciva/freebsd-update-build/scripts/build.subr Tue Jan 12 16:38:09 2016 (r293776)
+++ user/cperciva/freebsd-update-build/scripts/build.subr Tue Jan 12 18:06:07 2016 (r293777)
@@ -401,7 +401,8 @@ applypatches () {
while read PATCH; do
patch -p0 < ${PATCHDIR}/${PATCH}
# Remove ".orig" files created by patch(1) and empty files
- for file in $(awk '$1 ~ /^(Index:|diff)/ { print $NF }' < \
+ for file in $(sed -Ene \
+ 's/^--- (.*)(\.orig$|[[:space:]]*)?/\1/p' < \
${PATCHDIR}/${PATCH}); do
echo ${file}.orig
if [ ! -s ${file} ]; then
More information about the svn-src-user
mailing list