diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-06-26 21:23:24 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-06-26 21:38:59 +0200 |
commit | 68245b55c9e0c959ba739dc79d64edf9aefd501f (patch) | |
tree | f6237b7d5353e66270236e105dd65f07f08d443f /msys2-configure.sh | |
parent | 2869c656c1499d5667d6acdcc557c0810a6eb137 (diff) | |
download | fiv-68245b55c9e0c959ba739dc79d64edf9aefd501f.tar.gz fiv-68245b55c9e0c959ba739dc79d64edf9aefd501f.tar.xz fiv-68245b55c9e0c959ba739dc79d64edf9aefd501f.zip |
msys2-configure: only extract what we need
In case the packages directory has been preloaded or symlinked.
Diffstat (limited to 'msys2-configure.sh')
-rwxr-xr-x | msys2-configure.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/msys2-configure.sh b/msys2-configure.sh index c8c8eea..18a4c64 100755 --- a/msys2-configure.sh +++ b/msys2-configure.sh @@ -46,7 +46,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" "$repo/$name" @@ -69,10 +70,10 @@ 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 \ + while IFS= read -r name + do bsdtar -xf "packages/$name" --strip-components 1 \ --exclude '*/share/man' --exclude '*/share/doc' - done + done < db.want bsdtar -xf exiftool.tar.gz mv Image-ExifTool-*/exiftool bin |