diff --git a/functions b/functions index b4e8463..797b7a1 100644 --- a/functions +++ b/functions @@ -203,3 +203,11 @@ failcache_failure() { mkdir -p "${option_failcache_dir}" echo "${BUILDBOT_BUILDURL:-unknown}" > "${option_failcache_dir}/${key}" } + +get-maintainers() { + # 'username@macports.org github_username' => 'username@macports.org' + # $option_prefix is set in mpbb + # shellcheck disable=SC2154 + "${option_prefix}/bin/port" info --index --maintainers --line "$@" \ + | tr ', ' '\n' | fgrep '@' | tr '\n' ',' | sed 's/,$//' +} diff --git a/mpbb-install-dependencies b/mpbb-install-dependencies index d95d66e..f83ec20 100644 --- a/mpbb-install-dependencies +++ b/mpbb-install-dependencies @@ -17,14 +17,6 @@ Run \`$prog help' for global options and a list of other subcommands. EOF } -get-maintainers() { - # 'username@macports.org github_username' => 'username@macports.org' - # $option_prefix is set in mpbb - # shellcheck disable=SC2154 - "${option_prefix}/bin/port" info --index --maintainers --line "$@" \ - | tr ', ' '\n' | fgrep '@' | tr '\n' ',' | sed 's/,$//' -} - install-dependencies() { local port=${1-} if [[ -z $port ]]; then diff --git a/mpbb-install-port b/mpbb-install-port index 4de432d..33099da 100644 --- a/mpbb-install-port +++ b/mpbb-install-port @@ -17,14 +17,6 @@ Run \`$prog help' for global options and a list of other subcommands. EOF } -get-maintainers() { - # 'username@macports.org github_username' => 'username@macports.org' - # $option_prefix is set in mpbb - # shellcheck disable=SC2154 - "${option_prefix}/bin/port" info --index --maintainers --line "$@" \ - | tr ', ' '\n' | fgrep '@' | tr '\n' ',' | sed 's/,$//' -} - install-port() { local port=${1-} if [[ -z $port ]]; then