From 53e1ad509c2a4f38cafc2e1c3dacbcf994afc6cb Mon Sep 17 00:00:00 2001 From: Benjamin Schieder Date: Wed, 27 Oct 2004 03:28:02 +0000 Subject: [PATCH] Benjamin Schieder: Changes to scripts/Create-CkSumPatch: - remove unnecessary whitespace at end of line - make its output consistent with other patch-creating scripts (ie: patch -p1 instead -p0) [2004101515565507213] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@4598 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Create-CkSumPatch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/Create-CkSumPatch b/scripts/Create-CkSumPatch index 0d5269a0a..284278677 100755 --- a/scripts/Create-CkSumPatch +++ b/scripts/Create-CkSumPatch @@ -34,21 +34,21 @@ while [ "$1" ]; do echo "Usage:" echo "./scripts/Create-CkSumPatch [options] \\" echo " -repository " - echo + echo echo " Compute checksums for (source) files mentioned in .desc files and output" echo " a patch which can be applied to the ROCK sources to update the checksums." - echo " Only checksums for files that have the checksum set to 0 will be computed." + echo " Only checksums for files that have the checksum set to 0 will be computed." echo " Process single packages, a single repository, single .desc files or files" echo " from a target directory (e.g. target/bootdisk/download.txt)." echo echo "Options:" echo " -override create new checksums even if old ones are not equal 0;" - echo " checksums set to X are not changed anyhow" + echo " checksums set to X are not changed anyhow" echo " -help show this help text" echo echo "Example: create a cksum patch and apply it" echo " ./scripts/Create-CkSumPatch gcc -repository stf target/bootdisk/download.txt \\" - echo " package/base/dietlibc/dietlibc.desc | patch -p0" + echo " package/base/dietlibc/dietlibc.desc | patch -p1" echo exit ;; @@ -66,7 +66,7 @@ cksum_file() { sedscript='s,^[0-9]* *$file,$newcksum $file,' ;; *.desc) - has_D='fgrep "[D]" | sed "s/[[]D[^ ]*//"' + has_D='fgrep "[D]" | sed "s/[[]D[^ ]*//"' sedscript='s,\[D\] *[0-9]* *$file,[D] $newcksum $file,' ;; *) @@ -107,7 +107,7 @@ cksum_file() { eval "sed \"$sedscript\" -i /tmp/$$" done - diff -u $1 /tmp/$$ + diff -u ./$1 /tmp/$$ | sed -e "s,^+++ /tmp/$$,+++ ./$1,g" rm -f /tmp/$$ }