SBOFIXINFO(1)

NAME
sbofixinfo - fix common errors in SlackBuilds.org .info files

SYNOPSIS
sbofixinfo file-or-dir [file-or-dir ...]

DESCRIPTION
sbofixinfo attempts to fix common errors in SlackBuilds.org .info files. Each argument must be an .info file or a directory containing an .info file. With no arguments, the .info file in the current directory is fixed.

sbofixinfo attempts to fix the following errors in SBo .info files:

-   Out-of-order keys will be reordered to match the order in the template.

-   Extraneous keys will be removed.

-   Blank lines will be removed.

-   Extra whitespace will be removed. This doesn't include indentation for the 2nd and further lines of a multi-line value.

-   Missing \ (backslash) continuation characters will be added.

-   Missing " (double-quote) characters around key values will be added.

-   Values quoted with single-quotes will be quoted with double-quotes.

-   Multi-valued keys (e.g. DOWNLOAD with two URLs) will be split up into multiple lines, if they're not already. Any missing line-continuation backslashes will be added. Continuation lines will be correctly indented.

-   Any capitalized hex digits in MD5SUM or MD5SUM_x86_64 will be lowercased.

-   Lowercase key names (e.g. md5sum or download) will be uppercased.

-   Misspelled (typo'ed) key names will be corrected, if they're not too mangled. When this happens, a warning is given on standard error. The correction algorithm isn't perfect, so make sure you compare the original and 'corrected' key names using your own eyeballs and brain.

-   If there is no PRGNAM, it will be generated from the .info file's name (minus the .info extension).

sbofixinfo doesn't attempt to detect any other errors or dubious constructs. Use sbolint before and after running sbofixinfo for comprehensive checking.

The file is modified 'in-place', in the same way as the -i option to sed(1).

sbofixinfo keeps a backup of the original file with the extension .bak appended to the filename. If the backup file already exists, it will be silently overwritten. After the new file is generated, diff(1) (with its -u and --color options) is run on the backup and modified files, and the backup is deleted if the new file is identical. The diff output also goes to stdout, so the user can see what changes were made.

EXIT STATUS
Will be 0 for success. If any errors reading or writing any of the .info files occur, the exit status will be the error count.

BUGS
sbofixinfo can't automatically fix every issue sbolint reports. In particular, missing or extra values (for valid keys) can't automatically be fixed. This isn't really a bug, as sbofixinfo can't know what to do in these situations. In other words, sbofixinfo operates only at the syntactic level, and knows nothing of semantics.

AUTHOR
B. Watson <urchlay@slackware.uk>, aka Urchlay on Libera IRC.

SEE ALSO
sbolint(1), sbopkglint(1), sbodl(1), sbopkg(8), sboinstall(1)