Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit 90e637f

Browse files
committed
Make the script slightly more flexible
NAME=knative-serving DIR=/path/to/ks ./etc/scripts/catalog.sh
1 parent 9638f5a commit 90e637f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

etc/scripts/catalog.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
22

3-
DIR=${1:-$(cd $(dirname "$0")/../../olm-catalog && pwd)}
4-
5-
NAME="knative-operators"
6-
NAMEDISPLAY="Knative Operators"
3+
DIR=${DIR:-$(cd $(dirname "$0")/../../olm-catalog && pwd)}
4+
NAME=${NAME:-knative-operators}
5+
x=( $(echo $NAME | tr '-' ' ') )
6+
DISPLAYNAME=${DISPLAYNAME:=${x[*]^}}
77

88
indent() {
99
INDENT=" "
@@ -34,7 +34,7 @@ metadata:
3434
name: $NAME
3535
spec:
3636
configMap: $NAME
37-
displayName: $NAMEDISPLAY
37+
displayName: $DISPLAYNAME
3838
publisher: Red Hat
3939
sourceType: internal
4040
EOF

0 commit comments

Comments
 (0)