Skip to content

Commit

Permalink
Update 00-base.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Georg Lauterbach <[email protected]>
  • Loading branch information
georglauterbach committed Jul 3, 2024
1 parent 348ea04 commit 80bb198
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/unversioned/no_gui/data/home/.config/bash/00-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
function __is_bash_function() {
[[ $(type -t "${1:?Name of type to check is required}" || :) == 'function' ]]
}
export -f __is_bash_function

if ! __is_bash_function '__command_exists'; then
function __command_exists() {
Expand All @@ -30,12 +31,15 @@ function __hermes__execute_real_command() {
echo "Command '${COMMAND}' not found" >&2
return 1
}
export -f __hermes__execute_real_command

# shellcheck disable=SC2120
function __hermes__declare_helpers() {
local FUNCTIONS=('do_as_root' '__command_exists' '__is_bash_function' '__hermes__execute_real_command')
[[ -n ${1:-} ]] && FUNCTIONS+=("${@}")
declare -f "${FUNCTIONS[@]}"
}
export -f __hermes__declare_helpers

function do_as_root() {
local SU_COMMAND=${SU_COMMAND:-}
Expand Down

0 comments on commit 80bb198

Please sign in to comment.