Look, you don't have to like it.
Run make to bundle the library into a single file
build/jdvlib.sh.
Copy that file to your project and source it in your scripts.
# shellcheck source=./jdvlib.sh
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/jdvlib.sh"These variables affect the behaviour:
JDVLIB_DEBUG: Set totrueto enable debug output. There is not a lot of this, though.- Deprecation messages will include file and line of the caller.
JDVLIB_LOG_DEPRECATIONS: Set to something to log deprecation messages to~/.jdvlib-deprecations.log.
Functions that support the library. This module is the basis for imports, so there should never be an import of this file.
meta::for_each_library_modulemeta::importmeta::lib_is_compiledmeta::library_pathmeta::module_is_running
ANSI escape code utilities for text styling, cursor control, display manipulation, and terminal operations.
ansi::cursoransi::displayansi::isSupportedansi::styleansi::term
Functions to help with parsing and validation of command line arguments.
args::check_help_argargs::ensure_num_argsargs::ensure_num_args_betweenargs::flag_valueargs::get_flag_value
Functions that relate to the code itself, where it is located, and how it is used.
code::is_sourcedcode::script_dir
Functions used to manage environment variables.
env::__validate_var_nameenv::dotenv_deleteenv::dotenv_loadenv::dotenv_saveenv::ensure_is_set
Functions related to the filesystem, including existence checks, permissions, and mount detection.
fs::can_user_write_to_dirfs::ensure_dir_existsfs::ensure_file_existsfs::ensure_in_remote_mountfs::is_in_remote_mountfs::is_owned_by_user
Functions related to functions and function management.
func::call_first_matchingfunc::call_first_offunc::ensurefunc::existsfunc::list_functions_in_file
Functions related to Proxmox Virtual Environment (PVE).
pve::ensure_lxcpve::ensure_pvepve::is_lxcpve::is_pve
Functions related to the system, its attributes and capabilities.
sys::ensure_debiansys::ensure_docker_hostsys::ensure_docker_runningsys::ensure_has_commandssys::ensure_in_pathsys::ensure_linuxsys::ensure_macossys::get_archsys::get_ossys::has_commandsys::is_debiansys::is_docker_hostsys::is_docker_runningsys::is_in_pathsys::is_linuxsys::is_macossys::macos_code_namesys::macos_versionsys::run_assys::run_first_of
Functions that relate to text manipulation.
text::apply_in_placetext::comment_out_inside_markerstext::delete_around_markerstext::delete_inside_markerstext::filter_inside_markerstext::format_inside_markerstext::print_alignedtext::read_inside_markerstext::replace_inside_markers
Functions to interact with the user.
ui::askui::deco_messageui::deprecateui::dieui::echo_stepui::failui::infoui::noopui::okui::reassurance_requiredui::reassure
Functions related to users and groups.
user::add_to_groupsuser::createuser::ensure_existsuser::ensure_group_existsuser::ensure_in_groupuser::ensure_rootuser::existsuser::group_existsuser::is_in_groupuser::is_root