ARCH=arm64 OS=mac # get the latest version curl --silent https://api.github.com/repos/caddyserver/xcaddy/releases/latest \ | grep browser_download_url \ | cut -d : -f 2,3 \ | tr -d \" \ | grep $ARCH \ | grep $OS \ > .latest_download redo-ifchange .latest_download curl --location --silent $(cat .latest_download) \ | tar xf - -O xcaddy > $3 chmod +x $3