vända kappan efter vinden

Etymology
Literally, "turn the coat after the wind".

Verb

 * 1)  turn one's coat, trim one's sails