chore: add K8s ConfigMap command generator

This commit is contained in:
Jesús Pérez Lorenzo 2022-01-23 12:13:11 +00:00
parent 8acc237f90
commit 2300447baa

13
generarte-cfgmap.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
USAGE="generate-cfgmap.sh target-path"
[ "$1" == "-h" ] && echo "$USAGE" && exit
SOURCE="backups-manager.sh"
TARGET=$1
[ ! -r "$SOURCE" ] && echo "No $SOURCE path found" && exit 1
[ -z "$TARGET" ] && echo "No target path found" && exit 1
echo " backups-manager: |"> $TARGET
cat "$SOURCE" | sed 's/^/ /g' >> "$TARGET"