summaryrefslogtreecommitdiff
path: root/post-install.d/50vcs-commit
blob: 52c6c107a76bae7bddaaf06cf5a67b341a287630 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
set -e

message="committing changes after $HIGHLEVEL_PACKAGE_MANAGER run"

if [ "$VCS" = git ] && [ -d .git ]; then
	# ignore exit code since it exits nonzero if there is nothing to do
	git commit $GIT_COMMIT_OPTIONS -m "$message" || true
elif [ "$VCS" = hg ] && [ -d .hg ]; then
	hg commit $HG_COMMIT_OPTIONS -m "$message" || true
fi