summaryrefslogtreecommitdiff
path: root/unclean.d/50test
diff options
context:
space:
mode:
Diffstat (limited to 'unclean.d/50test')
-rwxr-xr-xunclean.d/50test12
1 files changed, 12 insertions, 0 deletions
diff --git a/unclean.d/50test b/unclean.d/50test
new file mode 100755
index 0000000..e52003f
--- /dev/null
+++ b/unclean.d/50test
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+if [ "$VCS" = git ]; then
+ [ -d .git ] && [ -n "`git status --porcelain`" ]
+elif [ "$VCS" = hg ]; then
+ [ -d .hg ] && ! hg status 2>&1 | wc -l | grep -q "^0$"
+elif [ "$VCS" = bzr ]; then
+ [ -d .bzr ] && ! bzr version-info --custom --template="{clean}\n" | grep -q "^1$"
+elif [ "$VCS" = darcs ]; then
+ [ -d _darcs ] && darcs whatsnew -l >/dev/null
+fi