make smarter
This commit is contained in:
parent
d6fa8fd8ec
commit
4552b7cb38
21
prov.sh
21
prov.sh
@ -8,8 +8,23 @@ function main() {
|
||||
prov-$RELEASE
|
||||
}
|
||||
|
||||
function install-jq {
|
||||
if which jq >/dev/null 2>&1 ; then
|
||||
return
|
||||
fi
|
||||
apt install -y jq
|
||||
}
|
||||
|
||||
function install-curl {
|
||||
if which curl >/dev/null 2>&1 ; then
|
||||
return
|
||||
fi
|
||||
apt install -y curl
|
||||
}
|
||||
|
||||
function detect-mirror-country() {
|
||||
apt install -y jq curl
|
||||
install-jq
|
||||
install-curl
|
||||
curl ipinfo.io | jq -r .country
|
||||
}
|
||||
|
||||
@ -59,6 +74,10 @@ zstd
|
||||
}
|
||||
|
||||
function install-age () {
|
||||
if which age >/dev/null 2>&1 ; then
|
||||
return
|
||||
fi
|
||||
|
||||
cd /tmp
|
||||
git clone https://filippo.io/age && cd age
|
||||
go build -o . filippo.io/age/cmd/...
|
||||
|
Loading…
Reference in New Issue
Block a user