]> git.nbdom.net Git - nb.git/commitdiff
delete nb-repo-dirs
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 10 Mar 2017 00:04:46 +0000 (00:04 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 10 Mar 2017 00:04:46 +0000 (00:04 +0000)
bin/nb-repo-dirs [deleted file]
etc/repo-dirs.conf [deleted file]

diff --git a/bin/nb-repo-dirs b/bin/nb-repo-dirs
deleted file mode 100755 (executable)
index 570e919..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env perl
-# NB 24.11.16: TODEL 
-die 'TODEL';
-#################################################################################
-#
-# List Repositery directories - NB 17.01.16
-#
-#################################################################################
-use strict;
-use File::Spec;
-use Cwd;
-use File::Basename;
-my @FILES_CHECK = (
-  '.nb-install',
-  '.nb-update',
-);
-my $FILE_EXISTS = '.nb-install';
-
-my $NB_ROOT = dirname ( dirname ( File::Spec->rel2abs( Cwd::abs_path(__FILE__) ) ) );
-my $CONF = "$NB_ROOT/etc/repo-dirs.conf";
-my $DEBUG = 0;
-($ARGV[0]||'') =~ /^--?(all|debug)$/ and $DEBUG = 1 and shift @ARGV;
-
-my @DIRS = (
-  $NB_ROOT,
-);
-
-if (-r $CONF) {
-  open(CONF,$CONF) or die "$0: can't read $CONF: $!";
-  while (<CONF>) {
-    chomp $_;
-    push @DIRS,$_ unless /^\s*(#|$)/;
-  }
-  close CONF;
-}
-
-#print map {"$_\n"} add_args(@DIRS) and exit 0 if $DEBUG;
-
-my %h;
-
-@DIRS and print
-       map {"$_\n"}
-       grep {$_ ne "" and !$h{$_}++}
-       map {
-
-    # To reduce glob return, we permit to use file as filter
-               my $dir =  (-e $_ and !-d  $_) ? dirname($_) : $_;
-    $dir =File::Spec->rel2abs(Cwd::abs_path($dir));
-
-    # Check is git
-               if ($dir ne $NB_ROOT and !-d "$dir/.git") {
-      warn "DEBUG: REJECT : $dir\n" if $DEBUG;
-                       "";
-    } else {
-
-      if ($DEBUG) {
-        for (@FILES_CHECK) {
-          warn "DEBUG: MISSING: $dir/$_\n" if !-r "$dir/$_";
-        }
-      }
-      add_args($dir);
-    }
-
-       }
-       glob join(' ',@DIRS)
-;
-
-sub add_args {
-  # Concat each args and return existing (ex: $0 proie etc/profile ...)
-  my @new;
-
-  for my $d (@_) {
-       #for my $d (glob join(' ',@_)) {
-  #for my $d (map { glob $_ } @_) {
-      #warn ".. $d" if $DEBUG;
-    for my $a (@ARGV) {
-      #warn "$d/$a";
-      #warn ".. $d/$a" if $DEBUG;
-      push @new, glob "$d/$a";
-    }
-  }
-
-  #warn @new;
-  @_ = grep { -e $_} @new if @new;
-  #return grep {-e $_} @_;
-  return @_;
-}
diff --git a/etc/repo-dirs.conf b/etc/repo-dirs.conf
deleted file mode 100644 (file)
index 32ad6b5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/{opt,opt/www,etc,home,home/www}/*/.nb-{install,update}
-/usr/local/src/.nb-install
-/{home,Users}/*/*/.nb-install
-/home/share/git/.nb-install