#!/usr/bin/perl
use Cwd;
open(PACK,"find * -name \"*.tgz\" -o -prune -name \".??*\" -type f |");
while(<PACK>) {
    chop;
    (@path) = split(/\//,$_);
    $file = pop(@path);
    $dir = join '/', (@path);
    print "+------------------------------------------------\n";
    print "+ $dir/$file \n";
    print "+------------------------------------------------\n";
    $basedir = cwd();
    chdir($dir) || die "Cannot chdir to $dir \n";
    open(FILE,"tar tvzpf $file |");
    while(<FILE>) {
        print;
    }
    close(FILE);
    chdir($basedir);
}
close(PACK);
