summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-10-14 15:49:31 -0400
committerRaghuram Subramani <raghus2247@gmail.com>2025-10-14 15:49:31 -0400
commit8a73b19c2cf2f6e6ee6941906be94c062e14179f (patch)
tree46b3a7039e0d7d53dd52b2dcdad0034049c44d06
parent12b6e667c3b19f69308f763192639f805ca8e08a (diff)
also add descriptions to cloned repos
-rwxr-xr-xclone-all-github11
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