jprops2bash
Convert Java properties file to bash env var script
Usage
It reads from stdin and writes to stdout:
$ cat > sample.properties teamcity.agent.jvm.file.encoding=UTF-8 teamcity.agent.jvm.file.separator=/ teamcity.agent.jvm.os.arch=amd64 teamcity.agent.jvm.os.name=Linux teamcity.agent.jvm.os.version=3.13.0-43-generic teamcity.agent.jvm.path.separator=\: teamcity.agent.jvm.specification=1.8 teamcity.agent.jvm.user.country=US teamcity.agent.jvm.user.home=/home/teamcity runParam.script.content=\#\!/bin/bash\n\nset -o errexit\n\# set -o xtrace\n\necho "*** <Root project> \:\: \\"run pipeline script\\" $ jprops2bash < sample.properties export TEAMCITY_AGENT_JVM_FILE_ENCODING='UTF-8' export TEAMCITY_AGENT_JVM_FILE_SEPARATOR='/' export TEAMCITY_AGENT_JVM_OS_ARCH='amd64' export TEAMCITY_AGENT_JVM_OS_NAME='Linux' export TEAMCITY_AGENT_JVM_OS_VERSION='3.13.0-43-generic' export TEAMCITY_AGENT_JVM_PATH_SEPARATOR=':' export TEAMCITY_AGENT_JVM_SPECIFICATION='1.8' export TEAMCITY_AGENT_JVM_USER_COUNTRY='US' export TEAMCITY_AGENT_JVM_USER_HOME='/home/teamcity' export RUNPARAM_SCRIPT_CONTENT='#!/bin/bash\n\nset -o errexit\n# set -o xtrace\n\necho "*** <Root project> :: \"run pipeline script\"'
and if you wanted to set environment variables for all of these you could do something like the following:
$ env | grep TEAM $ eval $(jprops2bash < sample.properties) $ env | grep TEAM TEAMCITY_AGENT_JVM_SPECIFICATION=1.8 TEAMCITY_AGENT_JVM_OS_NAME=Linux TEAMCITY_AGENT_JVM_PATH_SEPARATOR=: TEAMCITY_AGENT_JVM_FILE_SEPARATOR=/ TEAMCITY_AGENT_JVM_OS_ARCH=amd64 TEAMCITY_AGENT_JVM_USER_HOME=/home/teamcity TEAMCITY_AGENT_JVM_FILE_ENCODING=UTF-8 TEAMCITY_AGENT_JVM_USER_COUNTRY=US TEAMCITY_AGENT_JVM_OS_VERSION=3.13.0-43-generic
Metadata
Release files for jprops2bash 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jprops2bash-0.0.2.tar.gz | 2.3 kB | Without provenance | Details for jprops2bash-0.0.2.tar.gz |
Release files / jprops2bash-0.0.2.tar.gz
| Download URL | jprops2bash-0.0.2.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86c37effff74c9ca1b8527607c15992a463c5658ed9527a468680bd17bd8e952
|
|
BLAKE2b-256 checksum How to use checksums |
8fcd7c3a610bb393ed55237280e48bb356fbc4b522f1ec638da82fdb0e2dcd3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jprops2bash 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.