patchwork-apply.sh: handle OpenWrt repository structure
authorJo-Philipp Wich <jo@mein.io>
Sun, 4 Feb 2018 11:59:58 +0000 (12:59 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 4 Feb 2018 11:59:58 +0000 (12:59 +0100)
Also cope with patch files lacking a file extensions, certain versions
of the Python patchwork client appear to omit it.

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

index 5f293306cc6fe751c1ac925d34a626c624fa9ab3..a7933304954038d82b2a2bf79d08359ce510a4cb 100755 (executable)
@@ -20,7 +20,7 @@ fetch() {(
        mkdir "pwclient.get.$$"
        cd "pwclient.get.$$"
        pwclient get "$1"
-       mv *.patch "../$1.patch"
+       mv * "../$1.patch"
        cd ..
        rmdir "pwclient.get.$$"
 )}
@@ -99,12 +99,12 @@ format_reply() {
        esac
 
        case "$remote_host" in
-               git.lede-project.org)
+               git.lede-project.org|git.openwrt.org)
                        case "$remote_repo" in
-                               source.git)
+                               source.git|openwrt/openwrt.git)
                                        echo "Merged into ${remote_ref##*/} with"
                                ;;
-                               lede/*/staging.git)
+                               lede/*/staging.git|openwrt/staging/*.git)
                                        echo "Merged into my staging tree with"
                                ;;
                                *)