Project

mast

0.0
No commit activity in last 3 years
No release in over 3 years
Mast is a command line tool for generating manifests and digests. Mast makes it easy to compare a manifest to a current directory structure, and to update the manifest with a simple command by storing the command options it the manifest file itself.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

Mast¶ ↑

       ___
.-----'---'-.
|           |
|           |
|           |
'-----------'

Homepage . Source Code . Report Issue . Mailing List . IRC Channel

<img src=“http://travis-ci.org/rubyworks/mast.png” />

DESCRIPTION¶ ↑

Mast is a commandline utility for generating MANIFEST and DIGEST lists. It can be useful in conjunction with packaging tools, or as a stand-alone tool for monitoring file changes.

FEATURES¶ ↑

  • Intuitive command-line interface –simply specify what to include.

  • Self-referential header makes updating manifests easy.

  • Checksum digests can highlight file changes.

USAGE¶ ↑

Mast makes the process of generating manifests very easy, and even allows manifests to be updated without repeating inclusion/exclusion criteria by storing the command parameters in a comment line at the top of the generated output.

Lets try a simple example. Lets say we have the following folder structure, using ls -R we see:

$ ls -R
.:
demo_rtar  mint

./demo_rtar:
Lorem_ipsum.txt  lib  meta  web

./demo_rtar/lib:
demo_rock

./demo_rtar/lib/demo_rock:
tryme.rb

./demo_rtar/meta:
data

./demo_rtar/web:
index.html  rocklobster.jpg

./mint:
loremipsum.txt  tryme.rb

Now lets look at the same folder via ‘mast’.

$ mast
#!mast
demo_rtar
demo_rtar/Lorem_ipsum.txt
demo_rtar/lib
demo_rtar/lib/demo_rock
demo_rtar/lib/demo_rock/tryme.rb
demo_rtar/meta
demo_rtar/meta/data
demo_rtar/web
demo_rtar/web/index.html
demo_rtar/web/rocklobster.jpg
mint
mint/loremipsum.txt
mint/tryme.rb

As you can see it has listed all the files contained in the current folder. Notice also the first line is empty except for the ‘#’ character. This is a standard shell comment mark. We can specify special criteria to the mast command and these options will be reflected on this line. For example, lets say the mint directory is extraneous and we do not want it included in the list of files.

$ mast -x mint
#!mast -x mint
demo_rtar
demo_rtar/Lorem_ipsum.txt
demo_rtar/lib
demo_rtar/lib/demo_rock
demo_rtar/lib/demo_rock/tryme.rb
demo_rtar/meta
demo_rtar/meta/data
demo_rtar/web
demo_rtar/web/index.html
demo_rtar/web/rocklobster.jpg

So you can see how the commandline options carry over to the top comment line of the ouput. The advantage of this is that if you save the output to a standard location, i.e. a file named MANIFEST or meta/manifest with an optional ‘.txt` prefix (case insensitive), then you can automaitcally update the file by calling mast --update.

$ mast -x mint > MANIFEST

$ mast --update
MANIFEST updated.

You can also add a checksum to the file list to create a DIGEST.

$ mast -x mint -g sha1

Mast also provides options for ignoring files based on their basename, as well as omitting default excludes and ignores so that all files are lists. Use the –help option for more details.

HOW TO INSTALL¶ ↑

To install with RubyGems simply open a console and type:

$ gem install mast

For a traditional site installation use Ruby Setup (gem install setup).

$ tar -xvzf mast-1.3.0.tar.gz
$ cd mast-1.3.0.tar.gz
$ sudo setup.rb

See Ruby Setup for more information.

Copyright © 2009 Rubyworks

Mast is distributable according to the terms of the BSD-2-Clause license.

See COPYING.rdoc for details.