update_git_source_package.sh: misc fixes
authorJo-Philipp Wich <jo@mein.io>
Wed, 21 Feb 2024 20:52:16 +0000 (21:52 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 21 Feb 2024 20:52:16 +0000 (21:52 +0100)
 - Canonicalize TOPDIR
 - Fix github issue reference URLs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
update_git_source_package.sh

index a6b1c51e481406a6335515c39d552e5edadb3554..d7f823755d6ed7573aa15f703859f01a9017b016 100755 (executable)
@@ -74,7 +74,7 @@ grep -sq BuildPackage "$MAKEFILE" || {
        }
 }
 
-export TOPDIR
+export TOPDIR=$(cd "$TOPDIR"; pwd)
 export PATH="$TOPDIR/staging_dir/host/bin:$PATH"
 
 eval $(
@@ -160,7 +160,9 @@ GIT_FIXES="$(
                '#'[0-9]*)
                        case "$PKG_SOURCE_URL" in
                        *://github.com/*)
-                               echo "${PKG_SOURCE_URL%/}/issues/${issue#\#}"
+                               repourl=${PKG_SOURCE_URL%/}
+                               repourl=${repourl%.git}
+                               echo "${repourl}/issues/${issue#\#}"
                        ;;
                        *://git.openwrt.org/project/*)
                                project=${PKG_SOURCE_URL#*://git.openwrt.org/project/}