make pipeline work in one shot

replace grep | cut with one awk command to reduce complexity in pipeline
ignore .swp
chmod +x
change spacing from 8 to 4 spaces
replace [ with [[
style changes

move 'then' and 'do' to first line of statement
remove all deprecated products in one round

This prevents us from having to loop over the deprecated products only
removing one from the branch each time.
can't have quotes. need word-splitting
Merge pull request #2 from rmanly/master

make pipeline work in one shot