void-packages/srcpkgs/sudo/patches/install_perms.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

31 lines
612 B
Diff

--- a/scripts/install-sh 2011-01-13 10:34:38.853561570 +0100
+++ b/scripts/install-sh 2011-01-13 10:35:04.468525074 +0100
@@ -91,7 +91,6 @@ while ${MORETODO} ; do
X-G)
GROUP="$2"
shift
- ${ROOT} && CHGROUPIT=true
;;
X-G*)
if ${ROOT} ; then
@@ -110,12 +109,10 @@ while ${MORETODO} ; do
;;
X-M)
MODE="$2"
- ${ROOT} && CHMODIT=true
shift
;;
X-M*)
MODE="`echo \"$1\" | sed 's/^..//'`"
- ${ROOT} && CHMODIT=true
;;
X-n)
TOUCHIT=false
@@ -132,7 +129,6 @@ while ${MORETODO} ; do
X-O)
OWNER="$2"
shift
- ${ROOT} && CHOWNIT=true
;;
X-O*)
if ${ROOT} ; then