diff options
author | Mathieu Clabaut <mathieu.clabaut@gmail.com> | 2007-12-21 15:47:30 -0600 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-03 19:53:46 -0500 |
commit | 2a2227a3a79e0c246c1d3e4a9af967724196c3b5 (patch) | |
tree | 420051945c18b26173b7d8a1edce5ecfca419e27 /hg | |
parent | 73188e18a0967551f5d502793717a981fb27a688 (diff) |
post-apt.d : Translation into mercurial idiom
Diffstat (limited to 'hg')
-rw-r--r-- | hg/post-apt.d/10hg-test | 2 | ||||
-rw-r--r-- | hg/post-apt.d/30hg-add | 7 | ||||
-rw-r--r-- | hg/post-apt.d/30hg-addremove | 7 | ||||
-rw-r--r-- | hg/post-apt.d/40hg-rm | 12 | ||||
-rw-r--r-- | hg/post-apt.d/50hg-commit | 4 |
5 files changed, 10 insertions, 22 deletions
diff --git a/hg/post-apt.d/10hg-test b/hg/post-apt.d/10hg-test index e72f195..9149585 100644 --- a/hg/post-apt.d/10hg-test +++ b/hg/post-apt.d/10hg-test @@ -1,6 +1,6 @@ #!/bin/sh set -e -if [ ! -d .git ]; then +if [ ! -d .hg ]; then echo "etckeeper warning: etckeeper is not yet enabled for $(pwd)" >&2 echo "etckeeper warning: run etckeeper init to enable it" >&2 fi diff --git a/hg/post-apt.d/30hg-add b/hg/post-apt.d/30hg-add deleted file mode 100644 index 79aa406..0000000 --- a/hg/post-apt.d/30hg-add +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -set -e -if [ -d .git ]; then - if ! git-add .; then - echo "etckeeper warning: git-add failed" >&2 - fi -fi diff --git a/hg/post-apt.d/30hg-addremove b/hg/post-apt.d/30hg-addremove new file mode 100644 index 0000000..43356a7 --- /dev/null +++ b/hg/post-apt.d/30hg-addremove @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ -d .hg ]; then + if ! hg addremove .; then + echo "etckeeper warning: hg addremove failed" >&2 + fi +fi diff --git a/hg/post-apt.d/40hg-rm b/hg/post-apt.d/40hg-rm deleted file mode 100644 index 680dac0..0000000 --- a/hg/post-apt.d/40hg-rm +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -e - -TAB=" " - -if [ -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/hg/post-apt.d/50hg-commit b/hg/post-apt.d/50hg-commit index 1a5c55a..81f9e9f 100644 --- a/hg/post-apt.d/50hg-commit +++ b/hg/post-apt.d/50hg-commit @@ -1,12 +1,12 @@ #!/bin/sh set -e -if [ -d .git ]; then +if [ -d .hg ]; then # TODO: figure out what packages were acted on by the apt run, and # include that info in the commit message message="committing changes after apt run" # ignore exit code since it exits nonzero if there is nothing to do - git commit $GIT_COMMIT_OPTIONS -m "$message" || true + hg commit $GIT_COMMIT_OPTIONS -m "$message" || true fi |