Created
July 28, 2021 16:03
-
-
Save holishing/c145f196962d775ffee92619295203b0 to your computer and use it in GitHub Desktop.
update git repo desc for bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
for i in $(ls -d git/*.git) | |
do | |
cd "$i" | |
git fetch | |
git_remote_url=$(git config --get remote.origin.url) | |
if [[ $git_remote_url == *"github.com"* ]]; then | |
wget -O - https://api.github.com/repos/$(git config --get remote.origin.url|sed -e "s/^https:\/\/github.com\///" -e "s/\.git$//") | jq -r .description | tee description | |
fi | |
cd ${HOME} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment