logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 8bfb60a368487a8ffa1e0b20543becc4bea0806b
parent d676f9545bb66558fbf81a49d32f8bb0edaa8aa9
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 10 Oct 2017 02:45:46 -0700

fetch-curl: Allow overriding substitutions

Diffstat:

Mpkg/openbsd/gen.lua12++++++------
Mscripts/fetch-curl.rc12++++++------
2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/pkg/openbsd/gen.lua b/pkg/openbsd/gen.lua @@ -87,13 +87,13 @@ exe('yacc', [[usr.bin/yacc/( file('bin/yacc', '755', '$outdir/yacc') man{'usr.bin/yacc/yacc.1'} -fetch('curl', paths[['( - ./( +fetch('curl', paths[[ + -s '/^/src\//' './( bin/pax include lib/(libc/(crypt gen net stdlib string) libcrypto/arc4random) usr.bin/(diff doas fmt nc patch yacc) - )/* - ; - ./sys/sys/* -)']]) + )/*' + ';' + -s '/^/src\//' './sys/sys/*' +]]) diff --git a/scripts/fetch-curl.rc b/scripts/fetch-curl.rc @@ -1,7 +1,7 @@ flag e + if(~ $#* 0) { - echo 'usage: fetch-curl.rc dir pattern...' >[1=2] + echo 'usage: fetch-curl.rc dir [paxflags...]' >[1=2] exit 2 } @@ -26,15 +26,15 @@ for(archive in `{awk '{print $2}' sha256}) { case * tool=() } - pats=() + flags=() while(! ~ $1 '' ';') { - pats=($pats $1) + flags=($flags $1) shift } - if(~ $#pats 0) - pats='*/*' + if(~ $#flags 0) + flags=(-s '/^\.\|[^\/]*/src/' '*/*') shift - if(! ~ $#tool 0) $tool $archive | pax -r -s '/^\.\|[^\/]*/src/' $pats + if(! ~ $#tool 0) $tool $archive | pax -r $flags } if([ -d patch ]) {