From 55578730ca70c8a07e20368a249fda13386de740 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 13 Feb 2010 15:36:46 -0600 Subject: [PATCH] script/gentree: Handle properly formatted patch for removing .orig files; also fix improperly formatted patches --- patch/boot_device.hints-ata-probe.patch | 4 ++-- patch/etc_profile-sensible-defaults.patch | 2 +- patch/etc_ttys-serialconsole.patch | 2 +- patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch | 2 +- patch/usr_local_etc_sudoers-allow-wheel.patch | 2 +- script/gentree | 3 +-- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/patch/boot_device.hints-ata-probe.patch b/patch/boot_device.hints-ata-probe.patch index 36840f2..5f4ded7 100644 --- a/patch/boot_device.hints-ata-probe.patch +++ b/patch/boot_device.hints-ata-probe.patch @@ -1,5 +1,5 @@ ---- boot/device.hints 2010-01-10 18:01:08.000000000 -0600 -+++ boot/device.hints 2009-11-07 02:28:38.000000000 -0600 +--- boot/device.hints 2010-01-10 18:01:08.000000000 -0600 ++++ boot/device.hints 2009-11-07 02:28:38.000000000 -0600 @@ -7,6 +7,9 @@ hint.fd.0.drive="0" hint.fd.1.at="fdc0" diff --git a/patch/etc_profile-sensible-defaults.patch b/patch/etc_profile-sensible-defaults.patch index 8c6efa3..c88218a 100644 --- a/patch/etc_profile-sensible-defaults.patch +++ b/patch/etc_profile-sensible-defaults.patch @@ -1,4 +1,4 @@ ---- etc/profile.orig 2010-01-24 09:37:51.000000000 +0000 +--- etc/profile 2010-01-24 09:37:51.000000000 +0000 +++ etc/profile 2010-01-24 09:54:47.000000000 +0000 @@ -16,3 +16,59 @@ # msgs -f diff --git a/patch/etc_ttys-serialconsole.patch b/patch/etc_ttys-serialconsole.patch index 6adef4b..88e6fc7 100644 --- a/patch/etc_ttys-serialconsole.patch +++ b/patch/etc_ttys-serialconsole.patch @@ -1,4 +1,4 @@ ---- etc/ttys.orig 2010-01-24 09:48:01.000000000 +0000 +--- etc/ttys 2010-01-24 09:48:01.000000000 +0000 +++ etc/ttys 2010-01-24 09:49:02.000000000 +0000 @@ -32,17 +32,17 @@ # diff --git a/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch b/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch index 1d4a7c1..c402590 100644 --- a/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch +++ b/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch @@ -1,4 +1,4 @@ ---- usr/local/etc/gkrellmd.conf.orig 2010-01-24 09:30:22.000000000 +0000 +--- usr/local/etc/gkrellmd.conf 2010-01-24 09:30:22.000000000 +0000 +++ usr/local/etc/gkrellmd.conf 2010-01-24 09:31:10.000000000 +0000 @@ -13,11 +13,11 @@ # Specify a specific network interface to listen on for connections. diff --git a/patch/usr_local_etc_sudoers-allow-wheel.patch b/patch/usr_local_etc_sudoers-allow-wheel.patch index 05b8a06..8ff6cce 100644 --- a/patch/usr_local_etc_sudoers-allow-wheel.patch +++ b/patch/usr_local_etc_sudoers-allow-wheel.patch @@ -1,4 +1,4 @@ ---- usr/local/etc/sudoers.orig 2010-01-24 09:26:28.000000000 +0000 +--- usr/local/etc/sudoers 2010-01-24 09:26:28.000000000 +0000 +++ usr/local/etc/sudoers 2010-01-24 09:26:38.000000000 +0000 @@ -28,7 +28,7 @@ root ALL=(ALL) ALL diff --git a/script/gentree b/script/gentree index 5fbc414..5eb9d39 100755 --- a/script/gentree +++ b/script/gentree @@ -119,10 +119,9 @@ do_patch() { for file in "${patch}"/* do note "... $(basename "${file}")" - echo "... $(basename "${file}")" >&2 ( cd "${sroot}" && patch < "${file}" ) || chk # Remove .orig files - sed -e '/^+++ /!d; s/^+++ //; s/ *.*$//' "${file}" | while read target + sed -e '/^+++ /!d; s/^+++ //; s/[ ]*[0-9: .+-]*$//' "${file}" | while read target do rm -f "${sroot}/${target}.orig" done || chk -- 2.42.0