Make profile.d prefer /usr/share/omarchy-dev when present
Sets up the shadow-dir pattern that omarchy-dev-link will use: when /usr/share/omarchy-dev exists (as a symlink to a local checkout), $OMARCHY_PATH resolves there instead of /usr/share/omarchy. The PATH prepend then makes the checkout's bin/ override the package's /usr/bin copies. This covers every hot-edit surface that resolves via $OMARCHY_PATH: bin/, default/, shell/, and themes/. Things that don't go through $OMARCHY_PATH (udev rules, systemd drop-ins, /etc-installed configs, plymouth themes, /etc/skel seeds) remain unaffected by dev-link and require omarchy-dev-pkg-test to verify changes — which is also what you'd want before shipping any of those anyway.
This commit is contained in:
+18
-10
@@ -1,16 +1,24 @@
|
|||||||
# Default OMARCHY_PATH for non-install shells. install.sh overrides this
|
# Default OMARCHY_PATH for non-install shells.
|
||||||
# during the install flow to point at the checkout under
|
#
|
||||||
# $HOME/.local/share/omarchy when running in script-install (boot.sh) mode.
|
# - install.sh sets OMARCHY_PATH to $HOME/.local/share/omarchy during the
|
||||||
# omarchy-dev-link (Chunk 4) manages a symlink at /usr/share/omarchy that
|
# script-install (boot.sh) flow; that wins because of the :- guards.
|
||||||
# points at a local checkout when active.
|
# - omarchy-dev-link manages /usr/share/omarchy-dev as a symlink to a local
|
||||||
export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"
|
# checkout. When present, it shadows the package install for everything
|
||||||
|
# that resolves via $OMARCHY_PATH (bin/, default/, shell/, themes/).
|
||||||
|
# - Otherwise: the package install at /usr/share/omarchy.
|
||||||
|
if [ -z "${OMARCHY_PATH:-}" ]; then
|
||||||
|
if [ -d /usr/share/omarchy-dev ]; then
|
||||||
|
export OMARCHY_PATH=/usr/share/omarchy-dev
|
||||||
|
else
|
||||||
|
export OMARCHY_PATH=/usr/share/omarchy
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Prepend $OMARCHY_PATH/bin if it exists. In normal package mode this is a
|
# Prepend $OMARCHY_PATH/bin if it exists. In normal package mode this is a
|
||||||
# no-op: bins ship to /usr/bin (already on PATH), and /usr/share/omarchy/bin
|
# no-op: bins ship to /usr/bin (already on PATH), and /usr/share/omarchy/bin
|
||||||
# doesn't exist. The case that matters is omarchy-dev-link, which makes
|
# doesn't exist. The case that matters is omarchy-dev-link, which exposes the
|
||||||
# /usr/share/omarchy a symlink to a local checkout; then this prepend lets
|
# checkout's bin/ at /usr/share/omarchy-dev/bin so it can override the
|
||||||
# the checkout's bin/omarchy-* override the /usr/bin copies installed by
|
# /usr/bin copies the package installed.
|
||||||
# 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