Blame | Last modification | View Log | RSS feed
#! perl######################################################################### Copyright (c) VIX TECHNOLOGY (AUST) LTD## Module name : jats.sh# Module type : Makefile system# Compiler(s) : n/a# Environment(s): jats## Description : Create a file - using the jats touch##......................................................................#require 5.006_001;use strict;use warnings;#use Data::Dumper;use Getopt::Long;use Pod::Usage; # required for help supportuse FileUtils;my $opt_verbose = 0; # Verbositymy $opt_help = 0;my $opt_manual;## Globals#my $VERSION = "1.0";#-------------------------------------------------------------------------------# Function : Main Entry## Description : This small program will process hijacked files in a# static view. It will create a branch for the file and then# check the file in on the branch### Inputs : None## Returns : Even less.#my $result = GetOptions ("help+" => \$opt_help, # flag, multiple use allowed"manual" => \$opt_manual, # flag"verbose+" => \$opt_verbose, # flag);## Process help and manual options#pod2usage(-verbose => 0, -message => "Version: $VERSION") if ($opt_help == 1 || ! $result);pod2usage(-verbose => 1) if ($opt_help == 2 );pod2usage(-verbose => 2) if ($opt_manual || ($opt_help > 2));error ("No files to process")unless ( $#ARGV >= 0 );## Process files one by one#foreach ( @ARGV ){process_file( $_ );}exit;#-------------------------------------------------------------------------------# Function : process_file## Description : Process one file## Inputs : A single file## Returns :#sub process_file{my ($file) = @_;my $info = "aa" x 10;FileAppend ( $file, $info );}#-------------------------------------------------------------------------------# Documentation#=pod=head1 NAMExxxxx - Save a hijacked file on a private branch=head1 SYNOPSISxxxxxx [options] files...Options:-help - brief help message-help -help - Detailed help message-man - Full documentation-verbose - Verbose operation=head1 OPTIONS=over 8=item B<-help>Print a brief help message and exits.=item B<-help -help>Print a detailed help message with an explanation for each option.=item B<-man>Prints the manual page and exits.=item B<-verbose>Increases program output. This option may be specified mutiple times=back=head1 DESCRIPTIONThis small program will process hijacked files in a static view. It will createa branch for the file and then check the file in on the branch=cut