comparison update-vendor @ 725:0a896ffe3029

Switch to tgz bsdunzip doesn't seem to unzip from stdin.
author nanaya <me@nanaya.net>
date Mon, 19 Aug 2024 17:03:52 +0900
parents 1f8218896f2a
children
comparison
equal deleted inserted replaced
724:6faa6995937f 725:0a896ffe3029
1 #!/bin/sh 1 #!/bin/sh
2 2
3 set -u 3 set -u
4 set -e 4 set -e
5 5
6 for _cmd in wget unzip; do 6 for _cmd in tar wget; do
7 if command -v "$_cmd" > /dev/null 2>&1; then : 7 if command -v "$_cmd" > /dev/null 2>&1; then :
8 else 8 else
9 echo "${_cmd} is required" 9 echo "${_cmd} is required"
10 exit 1 10 exit 1
11 fi 11 fi
20 ) 20 )
21 } 21 }
22 22
23 _get_pack_github() { 23 _get_pack_github() {
24 ( 24 (
25 wget -nv -O - "https://github.com/${1}/${2}/archive/refs/heads/${3}.zip" | unzip -q - 25 wget -nv -O - "https://github.com/${1}/${2}/archive/refs/heads/${3}.tar.gz" | tar -zxf -
26 mv "./${2}-${3}" "./${2}" 26 mv "./${2}-${3}" "./${2}"
27 ) 27 )
28 } 28 }
29 29
30 _syntaxes() { 30 _syntaxes() {