mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-03 06:13:02 +02:00
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 <richard@bit42.se>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user