diff --git a/citus_dev/citus_dev-pipenv b/citus_dev/citus_dev-pipenv index eb671d1c..c6d6bdf2 100755 --- a/citus_dev/citus_dev-pipenv +++ b/citus_dev/citus_dev-pipenv @@ -1,24 +1,4 @@ #!/usr/bin/env bash - -# mostly copied from pipenv-shebang, but hardcoded for citus_dev -function getPipfile() { - DIR="$(dirname "$1")" - if [[ $DIR == "/" ]]; then exit; fi - PIPFILE="$DIR/Pipfile" - if [[ -e "$PIPFILE" ]]; then - echo "$PIPFILE" - else - getPipfile "$DIR" - fi -} - -SCRIPT="$(realpath "$0")" -DIRNAME="$(dirname "$SCRIPT")" -PIPFILE=$(getPipfile "$SCRIPT") - -if [[ -n "$PIPFILE" ]]; then - PIPENV_PIPFILE="$PIPFILE" exec pipenv run "${DIRNAME}/citus_dev" "$@" -else - echo "Could not locate the Pipfile for citus_dev." - exit 1 -fi +realfile=$(realpath $0) +dir=$(dirname $realfile) +pipenv-shebang "${dir}/citus_dev" "$@"