diff --git a/prov.sh b/prov.sh index ccfe91a..713d635 100644 --- a/prov.sh +++ b/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/...