summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-28 00:35:03 -0700
committerMichael Forney <mforney@mforney.org>2016-06-28 00:35:03 -0700
commit98f6b745137d075ee49b70a7214a7e33d37e9f96 (patch)
treec31c45efb769e2d54c69f09afe460018bf6d9006 /scripts
parent153ac63e5c298ba6318bbe1ecac7ecdb1bd3a571 (diff)
fetch-curl: Support specifying a pattern of files to extract
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fetch-curl.rc13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/fetch-curl.rc b/scripts/fetch-curl.rc
index 09ba2157..9f811837 100755
--- a/scripts/fetch-curl.rc
+++ b/scripts/fetch-curl.rc
@@ -2,12 +2,13 @@
flag e +
-if(! ~ $#* 1) {
- echo 'usage: fetch-curl.rc dir' >[1=2]
+if(~ $#* 0) {
+ echo 'usage: fetch-curl.rc dir pattern...' >[1=2]
exit 2
}
cd $1
+shift
if([ -e src ]) rm -rf src
@@ -27,7 +28,13 @@ for(archive in `{awk '{print $2}' sha256}) {
case *
tool=()
}
- if(! ~ $#tool 0) $tool $archive | pax -r -s '/^\.\|[^\/]*/src/'
+ pats=()
+ while(! ~ $1 '' ';') {
+ pats=($pats $1)
+ shift
+ }
+ shift
+ if(! ~ $#tool 0) $tool $archive | pax -r -s '/^\.\|[^\/]*/src/' $pats
}
if([ -d patch ]) {