Merge pull request #281 into master
e2d63306 client: lib_gen: generate custom plugin layout for all images (Aaron Fiore)
This commit was merged in pull request #281.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# docker-finance | modern accounting for the power-user
|
||||
#
|
||||
# Copyright (C) 2021-2024 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
# Copyright (C) 2021-2024,2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -478,6 +478,37 @@ function lib_gen::__gen_client()
|
||||
lib_utils::print_custom " \e[32m│ └─\e[34m Edit file now? [Y/n] \e[0m"
|
||||
lib_gen::__gen_edit "$global_custom_dockerfile"
|
||||
fi
|
||||
|
||||
#
|
||||
# Generate client-side `plugins` layout (custom)
|
||||
#
|
||||
|
||||
lib_gen::__gen_plugins
|
||||
}
|
||||
|
||||
# Custom plugins layout to drop-in custom plugins
|
||||
# NOTE: underlying impl expects this layout
|
||||
function lib_gen::__gen_plugins()
|
||||
{
|
||||
lib_utils::print_debug "Generating custom plugins layout"
|
||||
|
||||
[ -z "$DOCKER_FINANCE_CLIENT_PLUGINS" ] && lib_utils::die_fatal
|
||||
if [ ! -d "$DOCKER_FINANCE_CLIENT_PLUGINS" ]; then
|
||||
mkdir -p "$DOCKER_FINANCE_CLIENT_PLUGINS" || lib_utils::die_fatal
|
||||
fi
|
||||
|
||||
local -r _client="${DOCKER_FINANCE_CLIENT_PLUGINS}/client"
|
||||
if [ ! -d "${_client}/docker" ]; then
|
||||
mkdir -p "${_client}/docker" || lib_utils::die_fatal
|
||||
fi
|
||||
|
||||
local -r _container="${DOCKER_FINANCE_CLIENT_PLUGINS}/container"
|
||||
if [ ! -d "${_container}/finance" ]; then
|
||||
mkdir -p "${_container}/finance" || lib_utils::die_fatal
|
||||
fi
|
||||
if [ ! -d "${_container}/root" ]; then
|
||||
mkdir -p "${_container}/root" || lib_utils::die_fatal
|
||||
fi
|
||||
}
|
||||
|
||||
function lib_gen::__gen_container()
|
||||
@@ -500,17 +531,6 @@ function lib_gen::__gen_container()
|
||||
|
||||
fi
|
||||
|
||||
#
|
||||
# Generate plugins (custom)
|
||||
#
|
||||
|
||||
[ -z "$DOCKER_FINANCE_CLIENT_PLUGINS" ] && lib_utils::die_fatal
|
||||
if [ ! -d "$DOCKER_FINANCE_CLIENT_PLUGINS" ]; then
|
||||
mkdir -p "$DOCKER_FINANCE_CLIENT_PLUGINS" || lib_utils::die_fatal
|
||||
fi
|
||||
|
||||
lib_gen::__gen_plugins
|
||||
|
||||
#
|
||||
# Generate flow
|
||||
#
|
||||
@@ -597,34 +617,6 @@ function lib_gen::__gen_superscript_write()
|
||||
"${global_repo_conf_dir}/container/shell/superscript.bash.in" >"$global_superscript"
|
||||
}
|
||||
|
||||
#
|
||||
# Generate plugins (custom):
|
||||
#
|
||||
# - Provides:
|
||||
# - A layout to drop-in custom plugins
|
||||
# * Underlying impl expects this layout
|
||||
#
|
||||
|
||||
function lib_gen::__gen_plugins()
|
||||
{
|
||||
[ -z "$DOCKER_FINANCE_CLIENT_PLUGINS" ] && lib_utils::die_fatal
|
||||
|
||||
lib_utils::print_debug "Generating custom plugins layout"
|
||||
|
||||
local -r _client="${DOCKER_FINANCE_CLIENT_PLUGINS}/client"
|
||||
if [ ! -d "${_client}/docker" ]; then
|
||||
mkdir -p "${_client}/docker" || lib_utils::die_fatal
|
||||
fi
|
||||
|
||||
local -r _container="${DOCKER_FINANCE_CLIENT_PLUGINS}/container"
|
||||
if [ ! -d "${_container}/finance" ]; then
|
||||
mkdir -p "${_container}/finance" || lib_utils::die_fatal
|
||||
fi
|
||||
if [ ! -d "${_container}/root" ]; then
|
||||
mkdir -p "${_container}/root" || lib_utils::die_fatal
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Generate flow: times
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user