Process templates with only 'jq'

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..be1c671
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+trim_trailing_whitespace = true
+
+[*.sh]
+indent_style = space
+indent_size = 2
+tab_width = 2
diff --git a/linux-git-pull b/linux-git-pull
index 9664e8c..60b97b6 100755
--- a/linux-git-pull
+++ b/linux-git-pull
@@ -27,9 +27,20 @@
 git tag -s "$tag"
 git push origin "$tag"
 
-pull_request=$(git request-pull upstream/master "$SOURCE" "$tag")
+echo -n "Waiting 5 secs... "
+sleep 5
+echo done
 
-jq -n --arg tag "$tag" --arg pull_request "$pull_request" \
-  '{tag: $tag, pull_request: $pull_request}' > "git-pull-${tag}.json"
+pull_request=$(git request-pull mainline/master "$SOURCE" "$tag")
 
-mo "$template" "git-pull-${tag}.json" > "git-pull-${tag}.mbox"
+echo "tag=$tag"
+echo "pull_request=$pull_request"
+
+jq -r -n \
+  --arg tag "$tag" \
+  --arg pull_request "$pull_request" \
+  --arg template "$template_content" \
+  '
+    $template | gsub("{{tag}}"; $tag)
+      | gsub("{{pull_request}}"; $pull_request)
+  ' > "git-pull-${tag}.mbox"