summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-02-06 20:58:30 +0100
committerWolfram Sang <wsa+renesas@sang-engineering.com>2019-02-06 20:58:30 +0100
commitabc9d711d51b106dfceebab17a7e77cdd61d9277 (patch)
treeeafb3211ba1e6a1c73bccdc3b52f4d83d435c43a /scripts
parentbf6478becccc63fe4ac38daef6181976dc9641b7 (diff)
scripts/periupport_conv: mention ticket file in filename and desc
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/periupport_conv7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/periupport_conv b/scripts/periupport_conv
index 49fa00f..b8a2181 100755
--- a/scripts/periupport_conv
+++ b/scripts/periupport_conv
@@ -4,17 +4,18 @@
SRC="$1"
DST="$2"
+TICKET="$(basename $SRC .txt)"
[ ! -d "$DST" ] && mkdir -p "$DST"
# FIXME: ensure this is not already existing in another task
uuid_cmd="cat /proc/sys/kernel/random/uuid"
-gawk -v dst="$DST" -v cmd="$uuid_cmd" '
+gawk -v dst="$DST" -v ticket="$TICKET" -v cmd="$uuid_cmd" '
function make_filename(nam) {
gsub(/[: /]+/, "_", nam)
sub(/_$/, "", nam)
- return nam
+ return ticket "_" nam
}
/^B: / {
bsp_id = substr($0, 4, 40)
@@ -44,7 +45,7 @@ gawk -v dst="$DST" -v cmd="$uuid_cmd" '
delete(sorted_idx)
asorti(tasks[task], sorted_idx)
- print "title: \"Upport " task "\"" > F
+ print "title: \"From " ticket ", upport " task "\"" > F
print "team: TBD" >> F
print "key: " uuid >> F
print "status: New" >> F