The Autopackage API

Table of Contents / Public library / Replacements for standard commands

Replacements for standard commands

Functions that should be used instead of standard Unix commands.

Functions in this category

safeSed<FILENAME> <SCRIPTSTRING>
mkdirs<DIRS..>


Details

safeSed
Syntax: safeSed <FILENAME> <SCRIPTSTRING>
SCRIPTSTRING: A string containing the script to execute.
FILENAME: The file to edit.
This function is like sed, but works on a file. It uses FD swaps internally so you can reliably edit a file without hitting asyncronity issues.
Example:
echo 'One Two Three' > foo.txt
safeSed foo.txt 's/One/Two/g'


mkdirs
Syntax: mkdirs <DIRS..>
DIRS: The directory/directories to create.
Create directories and records it in the install logs. Directories created with this function will be automatically removed at uninstall by reverseLog (only if they're empty of course).


Last update: 10/6/2003