From 72a2b4789aba6188003deeb02d35e384e70656f8 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 11 Feb 2010 15:19:13 +0100 Subject: abort if not all local source files are under version control This looks a little hacky. The || true is needed because grep will return 1 if in fact everything is fine. implements FS#18048 --- commitpkg | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'commitpkg') diff --git a/commitpkg b/commitpkg index 11e345d..c7a8b51 100755 --- a/commitpkg +++ b/commitpkg @@ -49,6 +49,13 @@ else shift fi +# check if all local source files are under version control +(for s in ${source[@]}; do + echo $s | grep -vq '://' && \ + svn status $s | grep -q '?' && \ + abort "$s is not under version control" +done) || true + # see if any limit options were passed, we'll send them to SCP unset rsyncopts if [ "$1" = "-l" ]; then -- cgit v1.2.3-24-g4f1b