make smarter

This commit is contained in:
Jeffrey Paul 2021-06-10 16:36:28 -07:00
parent d6fa8fd8ec
commit 4552b7cb38
1 changed files with 20 additions and 1 deletions

21
prov.sh
View File

@ -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/...