X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=github-merge-pr.sh;h=d63b3455cad93c3db18c05debe504e2900159ae2;hb=HEAD;hp=16a661d2fb4fb28406ddb825e651be2015f526aa;hpb=727eb6a24b9794fc035c4a4fef9396a2428a2a1a;p=maintainer-tools.git diff --git a/github-merge-pr.sh b/github-merge-pr.sh index 16a661d..dd08a89 100755 --- a/github-merge-pr.sh +++ b/github-merge-pr.sh @@ -29,8 +29,11 @@ GITHUB_REPO_OWNER="openwrt" # Set this line in .config to use SSH key to rebase PR branch # GITHUB_USE_SSH=1 +SCRIPT_DIR="$(dirname $0)" +[ -h $0 ] && SCRIPT_DIR="$(dirname $(readlink $0))" + # Everything in .config will overwrite the default values set up -[ -f .config ] && source .config +[ -f "$SCRIPT_DIR/.config" ] && source "$SCRIPT_DIR"/.config PRID="$1" BRANCH="${2:-main}"