Shnatsel

Recursive search for "stock" on a list of Launchpad branches

Sep 15th, 2013
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for branch in 'lp:~somebody/project/branch' 'lp:~somebody-else/project/other-branch' 'lp:~third-party/other-project/branch'; do
  2.     rm -rf current_branch
  3.     bzr export current_branch "$branch"
  4.     stock_report=$(grep -ir stock current_branch)
  5.     if [ -n "$stock_report" ]; then
  6.         echo "$stock_report" > "$(echo $branch | tr '/' '|')"
  7.     fi
  8. done
RAW Paste Data