Clarify why profile.d/omarchy.sh prepends $OMARCHY_PATH/bin
The previous comment said 'mainly relevant for the script-install path', but install.sh and default/bash/envs already prepend it there. The real reason is dev-link: when /usr/share/omarchy is a symlink to a local checkout, this prepend lets the checkout's bin/ override the /usr/bin/ copies installed by the package.
This commit is contained in:
@@ -5,9 +5,12 @@
|
|||||||
# points at a local checkout when active.
|
# points at a local checkout when active.
|
||||||
export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"
|
export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"
|
||||||
|
|
||||||
# Convenience: prepend Omarchy's user-installable bin to PATH if it exists.
|
# Prepend $OMARCHY_PATH/bin if it exists. In normal package mode this is a
|
||||||
# (Mainly relevant for the script-install path; /usr/bin is already on PATH
|
# no-op: bins ship to /usr/bin (already on PATH), and /usr/share/omarchy/bin
|
||||||
# for the package-install path.)
|
# doesn't exist. The case that matters is omarchy-dev-link, which makes
|
||||||
|
# /usr/share/omarchy a symlink to a local checkout; then this prepend lets
|
||||||
|
# the checkout's bin/omarchy-* override the /usr/bin copies installed by
|
||||||
|
# the package.
|
||||||
case ":$PATH:" in
|
case ":$PATH:" in
|
||||||
*":$OMARCHY_PATH/bin:"*) ;;
|
*":$OMARCHY_PATH/bin:"*) ;;
|
||||||
*) [ -d "$OMARCHY_PATH/bin" ] && export PATH="$OMARCHY_PATH/bin:$PATH" ;;
|
*) [ -d "$OMARCHY_PATH/bin" ] && export PATH="$OMARCHY_PATH/bin:$PATH" ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user