Function check_scriptlet

Source
pub fn check_scriptlet(path: impl AsRef<Path>) -> Result<(), Error>
Expand description

Validates an alpm-install-scriptlet at path.

Naively checks whether at least one of the required function signatures is present in the file.

§Note

The file at path is neither sourced nor fully evaluated. This function only provides a very limited validity check!

§Errors

Returns an error, if

  • path can not be opened for reading,
  • path can not be read to String,
  • none of the required function signatures is present in the file.