#!/usr/bin/env bash if ! ( output=$(git status --porcelain) && [ -z "$output" ] ); then echo "Working directory isn't clean" >&2 exit 1 fi