The Autopackage API |
Table of Contents / Public library / Replacements for standard commands |
Functions that should be used instead of standard Unix commands.
safeSed | <FILENAME> <SCRIPTSTRING> |
mkdirs | <DIRS..> |
safeSed | ||||
Syntax: safeSed <FILENAME> <SCRIPTSTRING> | ||||
| ||||
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..> | ||
| ||
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). |