From ee9cbb397107f216db196b2a7717f278a51b578d Mon Sep 17 00:00:00 2001 From: Mathieu Clabaut Date: Fri, 21 Dec 2007 15:47:30 -0600 Subject: Move git files to hg one --- hg/post-apt.d/10git-test | 6 ------ hg/post-apt.d/10hg-test | 6 ++++++ hg/post-apt.d/30git-add | 7 ------- hg/post-apt.d/30hg-add | 7 +++++++ hg/post-apt.d/40git-rm | 12 ------------ hg/post-apt.d/40hg-rm | 12 ++++++++++++ hg/post-apt.d/50git-commit | 12 ------------ hg/post-apt.d/50hg-commit | 12 ++++++++++++ 8 files changed, 37 insertions(+), 37 deletions(-) delete mode 100644 hg/post-apt.d/10git-test create mode 100644 hg/post-apt.d/10hg-test delete mode 100644 hg/post-apt.d/30git-add create mode 100644 hg/post-apt.d/30hg-add delete mode 100644 hg/post-apt.d/40git-rm create mode 100644 hg/post-apt.d/40hg-rm delete mode 100644 hg/post-apt.d/50git-commit create mode 100644 hg/post-apt.d/50hg-commit diff --git a/hg/post-apt.d/10git-test b/hg/post-apt.d/10git-test deleted file mode 100644 index e72f195..0000000 --- a/hg/post-apt.d/10git-test +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -e -if [ ! -d .git ]; 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/10hg-test b/hg/post-apt.d/10hg-test new file mode 100644 index 0000000..e72f195 --- /dev/null +++ b/hg/post-apt.d/10hg-test @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +if [ ! -d .git ]; 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/30git-add b/hg/post-apt.d/30git-add deleted file mode 100644 index 79aa406..0000000 --- a/hg/post-apt.d/30git-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-add b/hg/post-apt.d/30hg-add new file mode 100644 index 0000000..79aa406 --- /dev/null +++ b/hg/post-apt.d/30hg-add @@ -0,0 +1,7 @@ +#!/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/40git-rm b/hg/post-apt.d/40git-rm deleted file mode 100644 index 680dac0..0000000 --- a/hg/post-apt.d/40git-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/40hg-rm b/hg/post-apt.d/40hg-rm new file mode 100644 index 0000000..680dac0 --- /dev/null +++ b/hg/post-apt.d/40hg-rm @@ -0,0 +1,12 @@ +#!/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/50git-commit b/hg/post-apt.d/50git-commit deleted file mode 100644 index 1a5c55a..0000000 --- a/hg/post-apt.d/50git-commit +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -e - -if [ -d .git ]; 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 -fi diff --git a/hg/post-apt.d/50hg-commit b/hg/post-apt.d/50hg-commit new file mode 100644 index 0000000..1a5c55a --- /dev/null +++ b/hg/post-apt.d/50hg-commit @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ -d .git ]; 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 +fi -- cgit v1.2.3