initial commit

This commit is contained in:
Aditya 2022-05-04 14:16:16 +05:30
commit 6b62c2395c
2 changed files with 16 additions and 0 deletions

8
README.md Normal file
View file

@ -0,0 +1,8 @@
# sizeof
print size of a github repo
## Requirements
jq, curl, GNU coreutils
## Usage
pass `username/repo` as argument to the script

8
sizeof.sh Normal file
View file

@ -0,0 +1,8 @@
#!/bin/sh
sizeof() {
curl -s https://api.github.com/repos/$1 | jq '.size' | numfmt --to-iec --from-unit=1024
}
size=$(sizeof $1)
echo $size