diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-02-04 21:57:13 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-02-04 21:57:13 -0500 |
commit | 40c6067eb67f28d207cf57f8ba2fc549315827b5 (patch) | |
tree | 51739f8915e3ddadc5fa0815c56672eae6ba064f /commit.d/30darcs-add | |
parent | bc5d04189542e6da934f7c901b0765891cc5c1d1 (diff) |
Support darcs. Thanks to Gian Piero Carrubba. Closes: #510032
Diffstat (limited to 'commit.d/30darcs-add')
-rw-r--r-- | commit.d/30darcs-add | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/commit.d/30darcs-add b/commit.d/30darcs-add new file mode 100644 index 0000000..98be4bf --- /dev/null +++ b/commit.d/30darcs-add @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +if [ "$VCS" = darcs ] && [ -d _darcs ]; then + rc=0 + res=$( darcs add -qr . 2>&1 ) || rc=$? + if test $rc -ne 0; then + if ! test $rc -eq 2 -a "${res%No files were added}" != "$res"; then + printf "%s" "$res" + echo "etckeeper warning: darcs add failed" >&2 + fi + fi + unset rc res +fi |