diff --git a/tools/fetch-pull-request b/tools/fetch-pull-request index d23b34f774..0d6c4c961e 100755 --- a/tools/fetch-pull-request +++ b/tools/fetch-pull-request @@ -1,9 +1,9 @@ #!/usr/bin/env bash set -e -this_file=$(readlink -f "${BASH_SOURCE[0]}") +this_dir=${BASH_SOURCE[0]%/*} # shellcheck source=lib/git-tools.bash -. "${this_file%/*}"/lib/git-tools.bash +. "${this_dir}"/lib/git-tools.bash require_clean_work_tree 'check out PR as branch' diff --git a/tools/fetch-rebase-pull-request b/tools/fetch-rebase-pull-request index 115f61d9d8..31ff4cdf75 100755 --- a/tools/fetch-rebase-pull-request +++ b/tools/fetch-rebase-pull-request @@ -1,9 +1,9 @@ #!/usr/bin/env bash set -e -this_file=$(readlink -f "${BASH_SOURCE[0]}") +this_dir=${BASH_SOURCE[0]%/*} # shellcheck source=lib/git-tools.bash -. "${this_file%/*}"/lib/git-tools.bash +. "${this_dir}"/lib/git-tools.bash require_clean_work_tree 'check out PR as branch' diff --git a/tools/reset-to-pull-request b/tools/reset-to-pull-request index 0480d5535f..6e5962ac62 100755 --- a/tools/reset-to-pull-request +++ b/tools/reset-to-pull-request @@ -39,9 +39,9 @@ if [ -z "$request_id" ]; then usage fi -this_file=$(readlink -f "${BASH_SOURCE[0]}") +this_dir=${BASH_SOURCE[0]%/*} # shellcheck source=lib/git-tools.bash -. "${this_file%/*}"/lib/git-tools.bash +. "${this_dir}"/lib/git-tools.bash require_clean_work_tree 'reset to PR'