#!/usr/bin/perl
#
# Author: Peter Keel <killer@discordia.ch>
# This converts Compressed or gzip'ed files into tar'ed bzip2'ed-files.
# Until I feel like unifying these, there are three versions of it, one
# for .Z, one for .tgz and one for .tar.gz.
#

die "Usage: $0 filename\n" unless ($ARGV[0]);

chop ( $PWD = `pwd`);
$base_dir = $PWD;

foreach $file_name (@ARGV)
    {
    	print STDERR "Processing '$file_name'\n";
	$new_file = $file_name;
        system ("gunzip $file_name");
	$new_file =~ s/\.tar.gz\b/\.tar/i;
        system ("bzip2 $new_file");
    }

