AminetAminet
Search:
84475 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/batch/fitr.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:App-specific text file mods for installs
Author:Chris Young
Uploader:chris unsatisfactorysoftware co uk (Chris Young)
Type:util/batch
Version:1.3
Architecture:ppc-amigaos >= 4.0.0 ; m68k-amigaos >= 3.0.0
URL:http://www.unsatisfactorysoftware.co.uk
Date:2009-08-19
Download:http://aminet.net/util/batch/fitr.lha - View contents
Readme:http://aminet.net/util/batch/fitr.readme
Downloads:1245

fitr is a small program which emulates the functionality of
Installer's "startup" command, but works on any text file, and
can use something other than a semicolon to mark the start and
end of fitr-added data for an application.

It is fully compatible with Installer's user-startup modifications,
so any application commands added to user-startup can be modified
with fitr and vice-versa.

btw, "fitr" stands for "For Installer Text Replacement", it has
nothing to do with ending fasting, although a point could be made
involving Installer's textfile and startup commands and starvation.
(I have made a mental note to check Google before naming software
next time)

DISTRIBUTION
============

fitr can be freely distributed with installation scripts, provided
the following or similar text is included in the accompanying
documentation:

"The install script uses fitr by Chris Young,
see http://www.unsatisfactorysoftware.co.uk/fitr"

USAGE
=====

Command-line usage
==================

Template:
FILE/A,APPNAME,NEWTEXT,BUFSIZE/K/N,COM=COMMENT/K,CHECK/S,PRINT/S,
LIST/S,TOP/S

FILE    = File to modify[1]
APPNAME = Application name - case sensitive (pick something unique!)
NEWTEXT = File containing text to add (if not specified, section will
          be deleted from the file) [3]
BUFSIZE = Text buffer size, default 1K. [2]
COMMENT = Text to place in front of the BEGIN/END markers, default ";"
CHECK   = If specified, fitr will check for a section for that app and
          set RC 5 (WARN) if it is found, 0 otherwise.
PRINT   = Displays the text section in FILE for APPNAME
LIST    = Prints a list of applications that have sections in FILE
TOP     = If the section does not exist, add it to the top of the file
          (default is to add new sections to the end)

LIST cannot be specified with any other switches.  If APPNAME is not
provided, fitr will default to LIST mode.

Examples

1> fitr s:user-startup
will print a list of the applications that have added sections to
user-startup.

1> fitr s:user-startup MUI PRINT
will print the text section for MUI from s:user-startup

1> fitr s:user-startup MyApp
will DELETE the section for MyApp.  Be careful with this!

1> fitr s:startup-sequence NewSetPatch startup.txt TOP
will replace NewSetPatch section in s:startup-sequence with
the contents of startup.txt.  If it doesn't exist, startup.txt
will be added to the TOP of the file.

1> fitr ram:logfiles usblog t:usb.log COM="#"
will add the contents of t:usb.log to ram:logfiles, between the
markers #BEGIN usblog and #END usblog (ram:logfiles will be
created if it doesn't exist)

Suggested Installer usage
=========================

Use the p_fitr procedure in the fitr-test script, called as follows:
(p_fitr "filename" "text to add" "comment marker" "additional switches")

See fitr-test for more examples, including how to use the CHECK
option from Installer scripts.

VERY IMPORTANT!
===============
[1] The file being modified MUST BE TEXT, BINARY FILES WILL
    PROBABLY BE IRREPAIRABLY DAMAGED
[2] FITR MAY TRUNCATE LINES LONGER THAN BUFSIZE
[3] If a section has no END comment, replacing that section
    WILL REPLACE THE REST OF THE FILE

HISTORY
=======
1.3 18.08.2009
* Added TOP

1.2 06.05.2009
* Added CHECK, PRINT, LIST and ability to delete sections
* Fixed some problems with the Installer procedure (most notably
  with spaces in filenames etc)

----
Please note the primary download location for my software is Aminet
(http://www.aminet.net).  If you obtained this archive from anywhere
else, please check Aminet and/or Unsatisfactory Software
(http://www.unsatisfactorysoftware.co.uk) for newer versions.

As usual, I cannot and will not accept responsibility for any damage,
loss of data etc incurred through use of this software.  This archive
is provided "as-is" without warranty of any kind and all use is at
your own risk.

Please check the PGP signature in the Aminet readme against the
archive to ensure it has not been tampered with.


Contents of util/batch/fitr.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 5361    6178  86.8% -lh5- d222 Aug 18 12:35 fitr.info
[generic]                 5886   10288  57.2% -lh5- d80a Aug 18 12:23 fitr/fitr
[generic]                 1055    2717  38.8% -lh5- d777 Aug 18 12:15 fitr/fitr-test
[generic]                 5782    8384  69.0% -lh5- da28 Aug 18 12:35 fitr/fitr-test.info
[generic]                 4042   69385   5.8% -lh5- 26c4 Aug 18 12:22 fitr/fitr.os4
[generic]                 2041    4278  47.7% -lh5- 544d Aug 18 12:35 fitr/fitr.readme
[generic]                 7450    9310  80.0% -lh5- 19ff Aug 18 12:35 fitr/fitr.readme.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         7 files   31617  110540  28.6%            Aug 19 06:23

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>