diff options
Diffstat (limited to 'post-install.d')
-rwxr-xr-x | post-install.d/10vcs-test | 13 | ||||
-rwxr-xr-x | post-install.d/30git-add | 8 | ||||
-rwxr-xr-x | post-install.d/30hg-addremove | 8 | ||||
-rwxr-xr-x | post-install.d/40git-rm | 12 | ||||
-rwxr-xr-x | post-install.d/50vcs-commit | 9 |
5 files changed, 2 insertions, 48 deletions
diff --git a/post-install.d/10vcs-test b/post-install.d/10vcs-test deleted file mode 100755 index ddd4448..0000000 --- a/post-install.d/10vcs-test +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -e - -not_enabled_warning() { - echo "etckeeper warning: etckeeper is not yet enabled for $(pwd)" >&2 - echo "etckeeper warning: run etckeeper init to enable it" >&2 -} - -if [ "$VCS" = git ] && [ ! -d .git ]; then - not_enabled_warning -elif [ "$VCS" = hg ] && [ ! -d .hg ]; then - not_enabled_warning -fi diff --git a/post-install.d/30git-add b/post-install.d/30git-add deleted file mode 100755 index 66d96a9..0000000 --- a/post-install.d/30git-add +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -if [ "$VCS" = git ] && [ -d .git ]; then - if ! git add .; then - echo "etckeeper warning: git add failed" >&2 - fi -fi diff --git a/post-install.d/30hg-addremove b/post-install.d/30hg-addremove deleted file mode 100755 index 1b999bb..0000000 --- a/post-install.d/30hg-addremove +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -if [ "$VCS" = hg ] && [ -d .hg ]; then - if ! hg addremove .; then - echo "etckeeper warning: hg addremove failed" >&2 - fi -fi diff --git a/post-install.d/40git-rm b/post-install.d/40git-rm deleted file mode 100755 index 3d5289a..0000000 --- a/post-install.d/40git-rm +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -e - -TAB=" " - -if [ "$VCS" = git ] && [ -d .git ]; then - for file in $(git ls-files --deleted); do - if [ ! -d "$file" ]; then - git rm --quiet "$file" - fi - done -fi 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 |