From c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 7 Jul 2020 20:49:26 +0200 Subject: Better dir --- src/gitjoe-rmuser.pl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 src/gitjoe-rmuser.pl (limited to 'src/gitjoe-rmuser.pl') diff --git a/src/gitjoe-rmuser.pl b/src/gitjoe-rmuser.pl new file mode 100755 index 0000000..944745f --- /dev/null +++ b/src/gitjoe-rmuser.pl @@ -0,0 +1,31 @@ +#!/usr/local/bin/perl + +use strict; +use warnings; +use Term::ANSIColor; + +sub main { + my $argc = $#ARGV + 1; + if ($argc < 1) { + print colored("Failed!\n", 'bold red') + . "Missing argument, 1 needed " + . colored("[user]", 'bold') + . "\n"; + exit 1; + } + my $usr = $ARGV[0]; + system( + '/usr/local/bin/dash', + '-c', + "rmuser << EOF +" . $usr . " +y +y +EOF" + ); + exit; +} + +main(); + +__END__ -- cgit v1.2.3