馃敡 Where my dotfiles lives in harmony and peace, most of the time
1#!/usr/bin/env bash
2
3set -euo pipefail
4
5# Check for dirty git repositories in all subdirectories
6for directory in */; do
7 if [[ -d "$directory" ]]; then
8 directory_name="${directory%/}"
9 if (cd "$directory_name" && git status --porcelain | grep -q .); then
10 echo "$directory_name"
11 fi
12 fi
13done