blob: 70579703bc07f4486507f59cd2d035faa495730e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#! /bin/bash
# Read a GitLab CI job name on $1 and transform it to a
# list of Kas yaml files
set -e -u
# Read Job namne from $1 and split on /
IFS=/ read -r -a PARTS<<<$1
# Prefix each part with ci/
PARTS=("${PARTS[@]/#/ci/}")
# Suffix each part with .yml
PARTS=("${PARTS[@]/%/.yml}")
# Print colon-separated
IFS=":"
echo "${PARTS[*]}"
|