switch.sh: add helper script