#!/usr/bin/env bash cd .. for d in */; do cd "$d" FILE=build if [ -d $FILE ]; then git checkout dev fi cd .. done cd ./build.sh