aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-06-26 20:54:38 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-06-26 20:54:38 +0200
commite5e42b63eb18da38ca2f9f6c2f4b49801045011b (patch)
treebad6be92ca53d06f2952fd34368dfd51336ae43d
parenta4532ea3228036feeb4dcee4d289777044d920d3 (diff)
downloadlogdiag-e5e42b63eb18da38ca2f9f6c2f4b49801045011b.tar.gz
logdiag-e5e42b63eb18da38ca2f9f6c2f4b49801045011b.tar.xz
logdiag-e5e42b63eb18da38ca2f9f6c2f4b49801045011b.zip
Win64Depends.sh: only extract what we need
In case the packages directory has been preloaded or symlinked.
-rw-r--r--Win64Depends.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/Win64Depends.sh b/Win64Depends.sh
index 105b1c8..8d68ec7 100644
--- a/Win64Depends.sh
+++ b/Win64Depends.sh
@@ -27,7 +27,8 @@ fetch() {
} BEGIN { while ((getline < "db.tsv") > 0) {
filenames[$1] = $2; deps[$1] = ""; for (i = 3; i <= NF; i++) {
gsub(/[<=>].*/, "", $i); deps[$1] = deps[$1] $i FS }
- } for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | while IFS= read -r name
+ } for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | tee db.want | \
+ while IFS= read -r name
do
status Fetching "$name"
[ -f "packages/$name" ] || curl -#o "packages/$name" "$repository/$name"
@@ -44,9 +45,9 @@ extract() {
for subdir in *
do [ -d "$subdir" -a "$subdir" != packages ] && rm -rf -- "$subdir"
done
- for i in packages/*
- do bsdtar -xf "$i" --strip-components 1 mingw64
- done
+ while IFS= read -r name
+ do bsdtar -xf "packages/$name" --strip-components 1
+ done < db.want
}
configure() {