Last active
January 5, 2018 19:10
-
-
Save nicopace/95124b69823d2f9c6316ef7ee06a711e to your computer and use it in GitHub Desktop.
lime-sdk get-feeds
This file contains hidden or 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
#!/bin/sh | |
for repodir in `ls -d */`; do | |
cd $repodir; | |
repo=${repodir%?} #one char less | |
echo src-git $repo `git config --get remote.origin.url`^`git rev-parse HEAD`; | |
cd ..; | |
done |
This file contains hidden or 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
#!/bin/sh | |
while read line | |
do | |
echo $line | |
repo=$(echo $line|awk '{print $2}') | |
remote=$(echo $line|awk '{print $3}') | |
commit=$(echo $remote| awk -F'^' '{print $2}') | |
cd $repo | |
git checkout $commit | |
cd .. | |
done < "${1:-/dev/stdin}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment