From e3c601f2fd0bcd9573593166a9eda173b7b9c28f Mon Sep 17 00:00:00 2001 From: Richard Alpe Date: Mon, 7 Apr 2025 15:09:36 +0200 Subject: [PATCH] confd: add script path option (-s) to migrate script This allows a user to run in on any system which has the Infix source code that contains the modification scripts. Signed-off-by: Richard Alpe --- src/confd/bin/migrate | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/confd/bin/migrate b/src/confd/bin/migrate index e04b503a..67804d0f 100755 --- a/src/confd/bin/migrate +++ b/src/confd/bin/migrate @@ -13,6 +13,7 @@ usage() echo " -h This help text" echo " -i Edit file in-place instead of sending to stdout, like sed" echo " -q Quiet, skip normal log messages, only errors are logged" + echo " -s PATH Specify custom script path" echo echo "By default, this script reads a .cfg file on stdin, or as the first" echo "non-option argument, then migrates it to a new syntax on stdout." @@ -121,7 +122,7 @@ chmod 600 "$tmp" trap cleanup INT HUP TERM EXIT -OPTS=$(getopt -o b:chiq -- "$@") +OPTS=$(getopt -o b:chiqs: -- "$@") eval set -- "$OPTS" while [ -n "$1" ]; do @@ -143,6 +144,10 @@ while [ -n "$1" ]; do -q) quiet=1 ;; + -s) + scripts=$2 + shift + ;; --) shift break