Skip to content

Support post-install messages and actions #1

@mroach

Description

@mroach

Some packages require or greatly benefit from some post-install configuration, scripts, and messages.

Add support for

  • Plain text messages e.g. "You should add this to your PATH"
  • Scripts

The post-install scripts may need to be dynamic so it has access to the package version.

An example might be:

post_install_message() {
  cat <<TXT
  You should add ${pkgdir}/libexec to the end of your PATH
TXT
}

post_install_script() {
  cat <<SH
  if [ ! -f $SYSCONF_DIR/etc/bashrc ]; then
    echo "Installing default bashrc"
    cp ${pkgprefix}/share/defaults/bashrc $SYSCONF_DIR/etc/bashrc
  fi
SH
}

Installing files into the /opt/local scope may be consideration for standard functionality. Something like:

maybe_install_defaults(
$pkgprefix/defaults/config $SYSCONF_DIR/$pkgname.config
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions