Though there are many binary compaction formats that could be used to gather files into a single file, this system uses a simple text-based format that is compatible with the UNIX shell system. The details of this format will be discussed later. The advantages of using a text-based format are two-fold. First, different operating systems use different internal file formats for text files, which form the bulk of the files in the site. This system knows these formats and can both recognize and produce them as it performs the various deployment operations. Binary zip formats cannot change the formats as they gather and then distribute files; thus, the user is required to use a separate process to do the text-line format conversions. Second, the authoring facilities of this system produce outputs which contain many files. It makes this operation easier to manage if the authors can produce single files using this text-based format that can then be deployed once they have been produced and accepted.
|Ext||Description of task|
|bnd||The specified file contains a bundled multi-file output of the tool. At this point, the files in the bundle are unbundled and deployed to their final target destinations.|
|dir||The specified file contains a list of filenames that are to be bundled into a single file for easy backup, later redeployment, or transfer to another environment.|
The following command line switches are recognized:
|ES||Echoes the input to the tool as it reads it|
|UNIX||Requests that text files use UNIX linefeed conventions|
|QUIET||Requests that no process messages be displayed|
|VERBOSE||Requests that progress messages be displayed|
|REPLACE||Requests that existing files be replaced|
|DEPLOY||Requests that file management commands be executed|
|NOHEADER||Requests that no header be displayed|
|Xname||Specifies an extraction location|
|Mname||Specifies the name of the file to be made|
|Pname||Specifies an input filename prefix|
After unzipping the files, there are 182 of them, the first step is to use notepad to look at buildads.log to see what the problems are. Unfortunately, notepad reports that this file contains 15 lines, each 1022 characters long that contain a large number of undisplayable characters. In fact, all of the files show this sort of thing. Though some Microsoft tools can work with them, most cannot. The problem of course is that Linux uses simple line-feeds to mark the end of text-lines; while Microsoft expects carriage-return, line-feed pairs at the end of each line (except the last one sometimes -- really!). Before this set of files can be used, they must be converted into Microsoft form. This can be done by bundling them and then unbundling them using the deployment capability. Of course, if the user had used this tool to do the bundling in the first place, then this second step would not be necessary. The tools were not available on the Linux machine, which is often the case.
To bundle a set of files, a list of those files is needed in a separate file whose extension is dir. The easiest way to do this in a Microsoft command window is with the dir command. For example
the above is a "brief" listing that produces the names of the .log and .sh files in simple form -- without additional size, type, or date information. Similar commands exist on all operating systems. Saying instead
produces a file test.dir which contains the names of the two files. Obviously the same can be done for large numbers of files. Once the .dir file exists, the simple command
produces a text file bundle test.bnd that contains the two files. There are two very important points. First, the deployment logic automatically recognized that the input files were in UNIX format and converted them as it read them. There was no need to tell the tool to do this. It always converts to the format of the platform that it is on when it reads a file to be bundled. Second, the bundled file is now a simple text file in the local Microsoft format and can be viewed/edited with notepad. It looks generally as follows, showing the start of each file
Note that each file is introduced by a cat command and is terminated by a !)(! marker. The tool understands these commands but so do the various shell programs originally developed for UNIX, but now available for all platforms. This deployment capability is NOT needed to deploy these bundled files.
The bundled file could now be worked with directly, but to show the entire process, the tool can now be told to unbundle the test.bnd file
The bnd extension tells the tool that an unbundling operation is to be performed. One of the problems with the deployment process is that it is easy to unintentionally overwrite existing files. The tool will not overwrite an existing file unless it is explicitly told to do so, using the REPLACE option,
Now, the files that were originally in UNIX format have been replaced by files that are in native format and can be worked on with all the native tools.
For deployment on UNIX platforms, text files must use line-feed (LF) end-of-line conventions. If you use the UNIX command-line option, the deploy utility will do this automatically on the Windows text files listed in test.dir
The test.bnd bundle file produced now uses UNIX end-of-line conventions, and it can be shelled directly on a UNIX Linux machine, using for example the UNIX command sh
On Windows, though it is now in UNIX format, test.bnd will unbundle into files that use Windows end-of-line format conventions