gitea/contrib/ini-to-shell
JustusBunsi 2901259a67
Fix golangci lint while preserving output format
Signed-off-by: justusbunsi <61625851+justusbunsi@users.noreply.github.com>
2024-11-28 21:08:05 +01:00
..
2024-11-28 20:20:04 +01:00

Ini to Shell
==================

This is the counterpart to environment-to-ini. It allows extracting
settings from an existing ini file for further processing in e.g. a shell.

The original incentive comes from the Helm Chart repository, where
the ini file must be recreated on changes while preserving some of them.

Since it is not possible to define an environment variable for the
parent process, this script simply echoes the value.

To build locally, run:

	go build contrib/ini-to-shell/ini-to-shell.go

To extract a value from an ini file, run:

	reflogExpire=$(go run contrib/ini-to-shell/ini-to-shell.go -c app.ini -s 'git.config' -k 'gc.reflogExpire')