chore: add K8s ConfigMap command generator
This commit is contained in:
parent
8acc237f90
commit
2300447baa
13
generarte-cfgmap.sh
Executable file
13
generarte-cfgmap.sh
Executable 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"
|
Loading…
Reference in New Issue
Block a user