Redistribution utility

Description

This utility allows a user to create a new MAT distribution with a new or updated task in it, based on an existing MAT distribution.

Usage

This utility can only be run on Unix.

% python $MAT_PKG_HOME/build/redistribute.py
Usage: redistribute.py [ --remove_task <task_dir> ]+ [ --task_dir <dir>[:<cvs_version>[:<dist_settings>]] ]+ orig_dist_zip outdir bundle_name

Options

--task_dir <dir>[:<cvs_version>[:<dist_settings>]]
The directory containing a well-structured MAT task, plus other possible control options (see below). May be repeated. If there is already a task directory in the existing distribution named <dir>, it will be removed and replaced with this one.
--remove_task <task_dir>
The <task_dir> is a directory within src/tasks in the zip file. May be repeated. If you provide this argument, this directory, and the task it corresponds to, will be removed from the output distribution.
orig_dist_zip
A path to the original MAT zip file which you received
outdir
The directory in which to deposit the new distribution
bundle_name
The name of the new distribution (the actual zip file will be <bundle_name>.zip, and the name of the toplevel directory in the zip file will be bundle_name.

The additional decorations to the --task option are as follows:

<cvs_version>
If the task directory is under CVS version control, this is the CVS tag you want. This facility is not available for any other version control system.
<dist_settings>
A comma-separated sequence of <key>=<val> settings, which are passed to the distribute function in the dist.py file in your task, if such a file and function exist. We provide this information for completeness; we do not provide any further details as of right now about how to customize your distribution using this facility. See the source code for redistribute.py.

Example 1

Let's say you received the distribution /my/downloads/MAT_1_2.zip, and you want to add the /path/to/myTask directory, creating the distribution /my/dist/MAT_1_2_plus_myTask.zip:

% python $MAT_PKG_HOME/build/redistribute.py --task_dir /path/to/myTask \
/my/downloads/MAT_1_2.zip /my/dist MAT_1_2_plus_myTask

Example 2

Let's say you received /my/downloads/MAT_1_2_plus_myTask.zip, and you want to remove myTask from the package you create:

% python $MAT_PKG_HOME/build/redistribute.py --remove_task myTask \
/my/downloads/MAT_1_2_plus_myTask.zip /my/dist MAT_1_2_without_myTask