Fix loading of .config is symbolic link is used to reference the
github-merge-pr.sh script.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
# 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 "$(dirname $0)/.config" ] && source $(dirname $0)/.config
+[ -f "$SCRIPT_DIR/.config" ] && source "$SCRIPT_DIR"/.config
PRID="$1"
BRANCH="${2:-main}"