aboutsummaryrefslogtreecommitdiffstats
path: root/test/scripts/git_pull_or_clean.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/scripts/git_pull_or_clean.sh')
-rwxr-xr-xtest/scripts/git_pull_or_clean.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/scripts/git_pull_or_clean.sh b/test/scripts/git_pull_or_clean.sh
new file mode 100755
index 00000000..b119a9cc
--- /dev/null
+++ b/test/scripts/git_pull_or_clean.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+CMD='git clean -dfX */'
+
+if git pull | grep -v 'Already up-to-date.'
+then
+ echo "Executing $CMD"
+ $CMD
+fi