For example I have this command
generate-and-deploy-new-version ./site-directory
and I want to run it only if content of the ./site-directory
was changed.
if checkchanges "./site-directory" ; then
generate-and-deploy-new-version ./site-directory
fi
checkchanges
could generate some hash of the directory content, save it in file and check it next time it will run.