diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-01-15 14:21:46 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-15 14:21:46 -0500 |
commit | c8f16796c6c72251814626ccf911d8f025cc60f3 (patch) | |
tree | 17c99c0cc0570d2167ceb3cf888d60df304a757a /post-install.d/50vcs-commit | |
parent | 45fa1c5a4d911503b545df62c4e276807063dc4e (diff) |
* Convert the directory parameter of etckeeper into "-d directory".
* Pass other patameters on from etckeeper to the .d scripts.
* Stop using run-parts for various reasons.
* Split out a commit.d that contains committing code that's used by
both the pre-install.d and post-install.d scripts.
* Split out an unclean.d that tests if the WC contains uncommitted
changes.
* Add preinst code to remove old post-install.d scripts.
Diffstat (limited to 'post-install.d/50vcs-commit')
-rwxr-xr-x | post-install.d/50vcs-commit | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/post-install.d/50vcs-commit b/post-install.d/50vcs-commit index 52c6c10..581e310 100755 --- a/post-install.d/50vcs-commit +++ b/post-install.d/50vcs-commit @@ -1,11 +1,6 @@ #!/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 +if etckeeper unclean; then + etckeeper commit "committing changes after $HIGHLEVEL_PACKAGE_MANAGER run" fi |