]>
Lady’s Gitweb - HOMEDIR/blob - sh/with-default-path.sh
2 # @(#)🏠📂 HOMEDIR sh/with-default-path.sh 2026-04-05T19:49:50Z
3 # SPDX-FileCopyrightText: 2026 Lady <https://www.ladys.computer/about/#lady>
4 # SPDX-License-Identifier: MPL-2.0
8 ## ∎ Copyright © 2026 Lady [@ Ladys Computer].
10 ## ⋮ This Source Code Form is subject to the terms of the Mozilla
11 ## Public License, version 2.0.
12 ## If a copy of the M·P·L was not distributed with this file, You can
13 ## obtain one at {🔗<https://mozilla.org/MPL/2.0/>}.
17 ## Some programs break with the `git´ customizations provided by this
18 ## repository, so it is important to reset the `PATH´ before calling
20 ## Symlinking such program names to this script provides the necessary
27 ## The following variables provide hooks to override the commands used
30 : "${cmd_BASENAME:=basename}"
32 ## The program name defaults to the basename of the script as it is
34 ## This allows one to simply create a symlink of the appropriate name
35 ## to this script rather than needing to configure anything
38 defaultprogramname
="$(
39 "${cmd_BASENAME}" -- "$0"
42 command -pv "${defaultprogramname}"
44 : "${cmd_PROGRAM:=${defaultprogram}}"
48 ## The implementation simply sets the `PATH´ appropriately (using the
49 ## builtin version of `getconf´) and then calls the program name.
50 ## `${HOMEDIR}/.local/bin´ is added to the `PATH´ to provide a single
51 ## point of extensibility for user‐level modifications; it is
52 ## important that this not be used to override default
53 ## implementations in cases where continued access to the latter is
56 PATH
='${HOMEDIR}/.local/bin:'"$(
57 command -p getconf PATH
58 )" "${cmd_PROGRAM}" "$@"
This page took 0.472809 seconds and 5 git commands to generate.