Skip to content

Instantly share code, notes, and snippets.

@garaemon
Created October 16, 2015 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garaemon/1c0db67c1c215a31bfda to your computer and use it in GitHub Desktop.
Save garaemon/1c0db67c1c215a31bfda to your computer and use it in GitHub Desktop.
#!/bin/bash
TARGET_PKG=$1
remote_branch_summary() {
target=$1
cd $(rospack find $target)
if git rev-parse --git-dir > /dev/null 2>&1; then
echo "## $target branch is $(git branch | sed -n -e 's/^\* \(.*\)/\1/p')"
echo "## $target git status"
echo "\`\`\`"
git status
echo "\`\`\`"
else
echo "##" $target is not installed from source
fi
}
echo "# report about $TARGET_PKG"
remote_branch_summary $TARGET_PKG
for pkg in $(rospack depends $TARGET_PKG)
do
remote_branch_summary $pkg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment