#!/bin/bash if [ $# -ne 1 ]; then echo "Usage: $0 owner/repo" exit 1 fi repo_info=$1 repo_size=$(curl -s "https://api.github.com/repos/${repo_info}" | jq '.size' | numfmt --to=iec --from-unit=1024 | tr -d '\n') echo "${repo_size}"