From 8a73b19c2cf2f6e6ee6941906be94c062e14179f Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Tue, 14 Oct 2025 15:49:31 -0400 Subject: also add descriptions to cloned repos --- clone-all-github | 11 ++++++++--- 1 file 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 -- cgit v1.2.3