diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 20:49:26 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-07 20:49:26 +0200 |
commit | c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf (patch) | |
tree | 5cf3e5c2396ef327383fba372cedfccf7bb5d98f /gitjoe-rmrepo.pl | |
parent | test (diff) | |
download | joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.gz joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.bz2 joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.xz joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.tar.zst joe-scripts-c546fee3fa3f3f1430bd289c51fc6a9e1a1030bf.zip |
Better dir
Diffstat (limited to 'gitjoe-rmrepo.pl')
-rwxr-xr-x | gitjoe-rmrepo.pl | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/gitjoe-rmrepo.pl b/gitjoe-rmrepo.pl deleted file mode 100755 index 30ce4d2..0000000 --- a/gitjoe-rmrepo.pl +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/local/bin/perl - -use strict; -use warnings; -use Term::ANSIColor; - -sub main { - my $argc = $#ARGV + 1; - if ($argc < 2) { - print colored("Failed!\n", 'bold red') - . "Missing argument, 2 needed " - . colored("[user - reponame]", 'bold') - . "\n"; - exit 1; - } - my $usr = $ARGV[0]; - my $repo = $ARGV[1]; - my $home_dir = '/usr/home/' . $usr . '/'; - if (substr($repo, -4) ne '.git') { - $repo = $repo . '.git'; - } - $repo = $repo . '/'; - system( - '/usr/local/bin/dash', - '-c', - '/bin/rm -rfv ' . $home_dir . $repo - ); - exit; -} - -main(); - -__END__ |