summaryrefslogtreecommitdiff
path: root/bin/src-unregister
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-02-14 10:11:00 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-02-14 10:11:00 -0700
commitd4b9e362fa64b1d3c75415bac3eaaaadd3634408 (patch)
tree8940ef6d9d4b906d0c6d72b692534fa5258aadb5 /bin/src-unregister
parent817a6222b2e3103a2d29f8efcda79c5b9d5d8855 (diff)
downloaddotfiles-d4b9e362fa64b1d3c75415bac3eaaaadd3634408.tar.gz
src-unregister checks that targets are repos
Diffstat (limited to 'bin/src-unregister')
-rwxr-xr-xbin/src-unregister2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/src-unregister b/bin/src-unregister
index c8a0b0db..1d888fe3 100755
--- a/bin/src-unregister
+++ b/bin/src-unregister
@@ -21,6 +21,8 @@ my $term = Term::ReadLine->new('brand');
foreach my $repo ( @ARGV ) {
die "$repo does not exist" if ! ( -d $repo );
+ die "$repo is not a git or hg repo"
+ if ! ( -d "$repo/.git" || -d "$repo/.hg" );
}
foreach my $repo ( @ARGV ) {