#!/bin/bash

PLUGIN_DIR="/usr/local/lib/slapt/plugins"
REAL_SLAPT="/usr/sbin/slapt-get"

CMD="${1:-}"
shift || true

# If plugin exists → run it
if [[ -x "$PLUGIN_DIR/$CMD" ]]; then
    exec "$PLUGIN_DIR/$CMD" "$@"
fi

# fallback → real slapt-get
exec "$REAL_SLAPT" "$CMD" "$@"
