projects
/
bak-git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91638a5
)
added find to locate files
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 23 Feb 2016 12:35:21 +0000
(13:35 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 23 Feb 2016 12:35:21 +0000
(13:35 +0100)
bak-git-server.pl
patch
|
blob
|
history
diff --git
a/bak-git-server.pl
b/bak-git-server.pl
index
e50805d
..
5ba7e17
100755
(executable)
--- a/
bak-git-server.pl
+++ b/
bak-git-server.pl
@@
-34,6
+34,7
@@
bak command, overview:
bak cat [host:]/path
bak grep pattern
+ bak find filename-pattern
bak - push all changed files to server
@@
-276,6
+277,8
@@
while (my $client = $server->accept()) {
print $client `git show $rel_path`;
} elsif ( $command eq 'grep' ) {
print $client `git log -g --grep=$rel_path`;
+ } elsif ( $command eq 'find' ) {
+ print $client `find . -iname '*$rel_path*' | sed -e 's,^./,,' -e 's,/,:/,'`
} elsif ( $command eq 'link' ) {
if ( $on_host ) {
mkbasedir "$on_host/$path";