diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-14 10:11:00 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-14 10:11:00 -0700 |
commit | d4b9e362fa64b1d3c75415bac3eaaaadd3634408 (patch) | |
tree | 8940ef6d9d4b906d0c6d72b692534fa5258aadb5 /bin/src-unregister | |
parent | 817a6222b2e3103a2d29f8efcda79c5b9d5d8855 (diff) | |
download | dotfiles-d4b9e362fa64b1d3c75415bac3eaaaadd3634408.tar.gz |
src-unregister checks that targets are repos
Diffstat (limited to 'bin/src-unregister')
-rwxr-xr-x | bin/src-unregister | 2 |
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 ) { |