Shar

Description

Creates a shar file. A shar file is a UNIX shell script that extracts one or more files from within its body and optionally executes additional shell commands.

Parameters

Attribute Description Required
destFile Destination file Yes
uuencode UUEncodes the files added to the archive. This must be set to true particularly if binary files are being included. Defaults to true. No

Parameters specified as nested elements

fileset

FileSets are used to select sets of files to be added to the shell archive.

postscript

Optional shell commands may be defined within this tag. These commands will be executed by the self extrating shell script after the extract process is completed.

Examples

    <shar destFile="install.sh">
      <fileset dir="${dir}" includes="**/*.java">
      </shar>
Create a self-extracting shell archive named install.sh that contains a set of java files that are uuencoded.
    <shar destFile="install.sh">
      <fileset dir="${dir}" includes="**/*.java" uuencode="no">
      <postscript>
      echo "Hello World!"
      </postscript>
      </shar>
Create a self-extracting shell archive named install.sh that contains a set of java files that are not uuencoded. When install.sh is run, the java files will be extracted and then "Hello World!" will be echoed stdout.

Copyright © 2003 Apache Software Foundation. All rights Reserved.