Advertisement
Shnatsel

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

Sep 15th, 2013
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement