Update 2024-01-02 08:22 OpenBSD/amd64-x13
This commit is contained in:
20
.mutt/scripts/attic/portpatch.sh
Executable file
20
.mutt/scripts/attic/portpatch.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
strip=0
|
||||
|
||||
clear
|
||||
printf '\n---------------------------------------------------------------------\n'
|
||||
egrep '^Index|^RCS|^diff --git|^file +' "$1" | sed 's,/cvs,/usr,g'
|
||||
printf '---------------------------------------------------------------------\n\n'
|
||||
|
||||
printf "Path for patch [/usr/ports]? "
|
||||
read _path
|
||||
|
||||
[ -z "$_path" ] && _path=/usr/ports
|
||||
egrep -q '^diff --git a/' "$1" && strip=1
|
||||
|
||||
#print "Trying to apply patch"
|
||||
#qprint -d "$1" "$1.out"
|
||||
|
||||
doas patch -Ep"$strip" -d $_path < "$1"
|
||||
cd $_path && ksh
|
||||
Reference in New Issue
Block a user