Update 2023-04-26 08:32 OpenBSD/amd64-x13
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
# needs converters/qprint
|
||||
# mutt: macro pager,attach ^S "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/portpatch2.sh /tmp/muttpatch.diff<enter>"
|
||||
|
||||
clear
|
||||
|
||||
printf '\n---------------------------------------------------------------------\n'
|
||||
grep -E 'Subject: |^Index|^RCS|^diff --git|^file +|^[-+]{3} ' "${1}"
|
||||
printf '---------------------------------------------------------------------\n\n'
|
||||
@@ -12,6 +13,8 @@ printf "Apply patch on path? "
|
||||
read -r _path
|
||||
_path=$(dev-dirs $_path)
|
||||
|
||||
print "Using: $_path"
|
||||
|
||||
printf "Fix quoted-printable mangeled patch? [y/N]: "
|
||||
read -r _qprint
|
||||
|
||||
@@ -23,5 +26,11 @@ esac
|
||||
printf "Strip? [0]: "
|
||||
read -r _strip
|
||||
|
||||
${_catcmd} "${1}" | doas patch -Ep${_strip:=0} -d ${_path:=/usr/ports}
|
||||
echo "DIR: $(pwd)"
|
||||
echo "CMD: ${_catcmd} "${1}" | doas -u sdk patch -E -pp${_strip:=0} -d ${_path}"
|
||||
sleep 1 && print 3
|
||||
sleep 1 && print 2
|
||||
sleep 1 && print 1
|
||||
|
||||
${_catcmd} "${1}" | doas -u sdk patch -E -p${_strip:=0} -d ${_path}
|
||||
cd ${_path} && doas su
|
||||
|
||||
Reference in New Issue
Block a user