diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-14 15:49:31 -0400 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-14 15:49:31 -0400 |
commit | 8a73b19c2cf2f6e6ee6941906be94c062e14179f (patch) | |
tree | 46b3a7039e0d7d53dd52b2dcdad0034049c44d06 | |
parent | 12b6e667c3b19f69308f763192639f805ca8e08a (diff) |
also add descriptions to cloned repos
-rwxr-xr-x | clone-all-github | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clone-all-github b/clone-all-github index 0269954..6381f59 100755 --- a/clone-all-github +++ b/clone-all-github @@ -1,10 +1,13 @@ #!/usr/bin/env bash USER=compromyse -REPOS=$(curl https://api.github.com/users/$USER/repos 2>/dev/null | jq -r '.[].name') +REPOS=$(curl https://api.github.com/users/$USER/repos 2>/dev/null) -for rawname in $REPOS; do - repo=$rawname.git +for i in $(seq 0 1 $(( $(echo $REPOS | jq length) - 1 ))); do + name=$(echo $REPOS | jq -r .[$i].name) + description=$(echo $REPOS | jq -r .[$i].name) + + repo=$name.git if [ ! -d $HOME/$repo ]; then @@ -18,6 +21,8 @@ for rawname in $REPOS; do git fetch github done + echo "$description" > description + popd > /dev/null fi |