mkimage-profiles/features.in/alternatives/rootfs/image-scripts.d/99-alternatives
Anton Midyukov 2f0cf575ec alternatives: initial feature
This feature allows you to set alternatives [1].
For example, like this:

   @$(call add,ALTERNATIVES,/usr/bin/xvt:/usr/bin/xterm)

Also, in the config itself, targets for setting alternatives may already
be predefined. For example, use/alternatives/xvt/% allows you to specify
arbitrary alternatives for xvt:
use/alternatives/xvt/xterm, use/alternatives/xvt/mate-terminal, etc.
However, an alternative must be available.

1. https://www.altlinux.org/Alternatives
2023-03-27 16:00:26 +07:00

11 lines
239 B
Bash
Executable File

#!/bin/sh -efu
[ -n "$GLOBAL_ALTERNATIVES" ] || exit 0
for alternative in $GLOBAL_ALTERNATIVES; do
candidate="${alternative#*:}"
alternative="${alternative%:*}"
alternatives-manual "$alternative" "$candidate"
done
alternatives-update