#help() unless @ARGV;
$main::_DATA_ = undef;
$Opt{find} = 1 if $Opt{'find-only'};
+$Opt{extension} =~ s/^\.// if $Opt{extension};
#################################################################################
#
follow_skip => 2,
no_chdir => 1
}, @ARGV);
- #exit;
+ if ($Opt{'find-only'}) {
+ print map {"$_\n"} @WANTED_FILES;
+ exit;
+ }
@ARGV = @WANTED_FILES;
- exit if $Opt{'find-only'};
}
#
#warn "$file ".(-r $file ? "YES" : "NO");
# Dont want the myself
- return if myself($file);
+ return if &myself($file);
my $hfile;
open($hfile,"<","$file");
# Dont want the myself
next if /$SHELL_IGNORE/;
- next unless /^.{1,3}<SHELL_REPLACE/;
+ #next unless /^.{1,3}<SHELL_REPLACE/;
+ next unless /^\s*.{1,3}[=>]SHELL_REPLACE/;
verbose(1,"Found: $file");
push @WANTED_FILES, $file;
nb_api() {
local uri="$1"; shift
local auth=""
- #=SHELL_REPLACE echo ssh root@ldap.nbdom.net grep CLEARTEXT /etc/ldap/nbdom.net/auth/nb.ldif | awk -F '}' '{print "NB_AUTH=\"nb:"$2"\""}'
+ #=SHELL_REPLACE ssh root@ldap.nbdom.net grep CLEARTEXT /etc/ldap/nbdom.net/auth/nb.ldif | awk -F '}' '{print "auth=\"nb:"$2"\""}'
[ -z "$auth" ] && auth="nb:0TXARcQUpjHZctoROA2X.weWSZKM5DGT"
let mimeAliases = {
\ 'sh' : 'bash'
\}
-">SHELL_REPLACE dbq db=nb t=meta action=table.rows rows.fields=key,val cat=file.check format=vim_hash name=mimeCheck preff="$(printf "\t")"
+">SHELL_REPLACE dbq db=nb t=meta action=table.rows rows.fields=key,val cat=file.check orderby=key format=vim_hash name=mimeCheck preff="$(printf "\t")"
let mimeCheck = {
\ 'awk' : 'awk < /dev/null --lint=no-ext --file'
\,'bash' : 'bash -c'
\}
"<SHELL_REPLACE
-">SHELL_REPLACE dbq.php nb meta ls key,val cat=mime.comment format=vim_hash preff="$(printf "\t")" name=mimeComment
+">SHELL_REPLACE dbq.php nb meta ls key,val cat=mime.comment orderby=key format=vim_hash preff="$(printf "\t")" name=mimeComment
let mimeComment = {
\ 'bindzone' : ';'
\,'c' : '//'
<?php
class Http {
const Status = [
-#>SHELL_REPLACE dbq.php /$NB_DB/http_status/ls/id,name orderby=id format=php_hash preff=$'\t'
+#>SHELL_REPLACE dbq.php /$NB_DB/http_status/ls/id,name orderby=id format=php_hash preff="$(printf '\t\t')"
"100" => "Continue",
"101" => "Switching Protocols",
"102" => "Processing",
<?php
class Mime {
const Types = [
-#>SHELL_REPLACE dbq "/pub/mime/ls/type,ext.php_hash?preff=%09%09"
+#>SHELL_REPLACE dbq "/pub/mime/ls/type,ext.php_hash?preff=%09%09&orderby=type"
"application/applixware" => "aw",
"application/atomcat+xml" => "atomcat",
"application/atomsvc+xml" => "atomsvc",