diff --git a/generarte-cfgmap.sh b/generarte-cfgmap.sh new file mode 100755 index 0000000..322bac8 --- /dev/null +++ b/generarte-cfgmap.sh @@ -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"