#!/usr/bin/perl -T

# delgroup: a utility to delete groups from the system

# Copyright (C) 2006-2008 Davor Ocelic <docelic@spinlocksolutions.com>
#                         SPINLOCK, http://www.spinlocksolutions.com/

use warnings;
use strict;
use lib '.'; # XXX

use Getopt::Long;

use Debian::Adduser::Init   qw/:gettext/;
use Debian::Adduser::Common qw/:reporting/;
use Debian::Adduser::Config qw/:cfg :getopt/;
use Debian::Adduser::Backend;

pregetopt();

unless ( GetOptions (
    %Debian::Adduser::Config::getopt, # Global options
    "system!"                            => \&W,
    "only_if_empty|only-if-empty!"       => \&W,
) ) {
  usage();
  exit 1;
}

postgetopt();

my $be = new Debian::Adduser::Backend;
$be->check;
$be->execute;
$be->finish;
exit 0;

# Local Variables:
# mode:cperl
# cperl-indent-level:4
# End:
# vim:set ai et sts=4 sw=4 tw=0:

__DATA__
delgroup [options] <name>

Options:
  --system                       - delete system group
  --only_if_empty|only-if-empty  - 
