#!/bin/sh

# check if commit message is empty
if ! grep -v "^#" "$1" | grep -q -v "^$"; then
    SCRIPT_DIR=$(dirname "$0")
    "${SCRIPT_DIR}/gpt-commit.py" --print-message > "$1"
fi
