summaryrefslogtreecommitdiff
path: root/scripts/periupport_conv
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/periupport_conv')
-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