summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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