From 01f471f2da9a4b3be662de118556ab76fdb2a0cf Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Fri, 29 Mar 2024 15:25:06 -0700 Subject: [PATCH] fixes Signed-off-by: Jess Frazelle --- .dockerfunc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.dockerfunc b/.dockerfunc index 3b7bbfda7..bf5a469b0 100644 --- a/.dockerfunc +++ b/.dockerfunc @@ -105,11 +105,15 @@ audacity(){ ${DOCKER_REPO_PREFIX}/audacity } aws(){ - docker run -it --rm \ - -v "${HOME}/.aws:/root/.aws" \ - --log-driver none \ - --name aws \ - ${DOCKER_REPO_PREFIX}/awscli "$@" + if [[ -n "$(which aws)" ]]; then + "$(which aws)" "$@" + else + docker run -it --rm \ + -v "${HOME}/.aws:/root/.aws" \ + --log-driver none \ + --name aws \ + ${DOCKER_REPO_PREFIX}/awscli "$@" + fi } az(){ docker run -it --rm \ @@ -1109,9 +1113,13 @@ torproxy(){ hostess add torproxy "$(docker inspect --format '{{.NetworkSettings.Networks.bridge.IPAddress}}' torproxy)" } traceroute(){ - docker run --rm -it \ - --net host \ - ${DOCKER_REPO_PREFIX}/traceroute "$@" + if [[ -n "$(which traceroute)" ]]; then + "$(which traceroute)" "$@" + else + docker run --rm -it \ + --net host \ + ${DOCKER_REPO_PREFIX}/traceroute "$@" + fi } transmission(){ del_stopped transmission