Skip to content

Instantly share code, notes, and snippets.

@nicopace
Last active January 5, 2018 19:10
Show Gist options
  • Save nicopace/95124b69823d2f9c6316ef7ee06a711e to your computer and use it in GitHub Desktop.
Save nicopace/95124b69823d2f9c6316ef7ee06a711e to your computer and use it in GitHub Desktop.
lime-sdk get-feeds
#!/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
#!/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