#!/bin/sh # This script can launch a Debian Installer instance. It has multiple plugins # that must provide the following methods: # # - _usage # - _cleanup # - _prepare # - _run set -e call_for_plugin() { plugin=$1 method=$2 shift 2 args="$@" if ! ${plugin}_${method} $args; then return 1 fi return 0 } call_for_plugins() { method=$1 shift args="$@" for p in $PLUGINS; do call_for_plugin $p $method $args done } usage() { cat <