You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
1.3 KiB
Bash
92 lines
1.3 KiB
Bash
#shellcheck shell=sh
|
|
|
|
source_env_file() {
|
|
if [ ! -f "${1}" ]; then
|
|
return
|
|
fi
|
|
eval "$(
|
|
grep -v '^\s*\#' "${1}" |
|
|
grep -v '^\s*$' |
|
|
sed 's/^\s*export//g' |
|
|
sed 's/^/export /g'
|
|
)"
|
|
}
|
|
|
|
_run_require() (
|
|
import=${1}
|
|
shift
|
|
fn=$(echo "${import}" | sed 's|/|_|g')
|
|
set -eu
|
|
. "${XDG_DATA_HOME}/buddy/include.sh"
|
|
require "${import}"
|
|
${fn} "$@"
|
|
)
|
|
|
|
add_date_prefix () (
|
|
_run_require add_date_prefix "$@"
|
|
)
|
|
|
|
command_installed () (
|
|
_run_require assert/command "$@"
|
|
)
|
|
|
|
gem_env () (
|
|
_run_require gem_env "$@"
|
|
)
|
|
|
|
get_bitrate () (
|
|
_run_require get_bitrate "$@"
|
|
)
|
|
|
|
get_create_date () (
|
|
date -r "$1" +"%F"
|
|
)
|
|
|
|
github_install_scripts () (
|
|
_run_require github/install_scripts "$@"
|
|
)
|
|
|
|
github_install_scripts_latest_releases () (
|
|
_run_require github/install_scripts_latest_releases "$@"
|
|
)
|
|
|
|
github_latest_release () (
|
|
_run_require github/latest_release "$@"
|
|
)
|
|
|
|
github_releases () (
|
|
_run_require github/releases "$@"
|
|
)
|
|
|
|
github_tags () (
|
|
_run_require github/tags "$@"
|
|
)
|
|
|
|
go_deps () (
|
|
_run_require go_deps "$@"
|
|
)
|
|
|
|
json_to_yaml () (
|
|
_run_require json_to_yaml "$@"
|
|
)
|
|
|
|
yaml_to_json () (
|
|
_run_require yaml_to_json "$@"
|
|
)
|
|
|
|
make_script () (
|
|
_run_require make_script "$@"
|
|
)
|
|
|
|
min_jpg () (
|
|
_run_require min_jpg "$@"
|
|
)
|
|
|
|
min_png () (
|
|
_run_require min_png "$@"
|
|
)
|
|
|
|
slugify () (
|
|
_run_require slugify "$@"
|
|
)
|