Revert "Revert "Abort build if there are no changes since the previous one""

This reverts commit 7f00736a8297974c64ecd717eaefe391ce3a38e7, fixed
by forcing bash as the script's shell