#!/usr/bin/env zsh

doc="usage: $(basename $0) [-h]

Exit with 0 if git is clean, otherwise 1.

optional arguments:
  -h, --help         show this help message and exit
"

zparseopts -D -E -F - h=help -help=help
if (( ${#help} > 0 )) {
    echo ${doc}
    exit 0
}

tmp=$(git status --porcelain)
echo ${tmp}
if [[ ! -z ${tmp} ]] {
    exit 1
}
