--- /dev/null
+Simple tracking of remote files in central git repository
+with only shell, netcat, rsync and ssh on client
+
+http://blog.rot13.org/bak-git/
+
+
+ commit --author support
+ diff/revert from another host:/paths/
+ bak diff without params doesn't return full host diff
++ bak cat host:/path/to/file
- bak ls
- daily cron job to create branch with uncommited changes
-- bak cat host:/path/to/file
bak ch[anges]
bak revert [host:]/path
+ bak cat [host:]/path
+
bak - push all changed files to server
See L<http://blog.rot13.org/bak-git> for more information
print $client git "checkout -- $hostname/$path";
system 'rsync', '-avv', "$hostname/$path", "root\@$hostname:$path";
}
+ } elsif ( $command eq 'cat' ) {
+ my $file_path = ( $on_host ? $on_host : $hostname ) . "/$path";
+ open(my $file, '<', $file_path) || warn "ERROR $file_path: $!";
+ while(<$file>) {
+ print $client $_;
+ }
+ close($file);
} else {
print $client "Unknown command: $command\n";
}