Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
obs-service-replace_using_env.19318
replace_using_env
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File replace_using_env of Package obs-service-replace_using_env.19318
#!/bin/bash set -e VARS=() FILES=() VERBOSE= while [ -n "$1" ]; do param="$1" arg="$2" case "${param}" in --eval) eval "${arg}" shift 2 ;; --var) VARS+=(${arg}) shift 2 ;; --file) FILES+=(${arg}) shift 2 ;; --verbose) VERBOSE=1 shift 2 ;; *) echo "Ignoring unknown parameter: ${param}" shift esac done if [ ${#FILES[@]} -eq 0 ]; then echo "No input files" exit 0 fi for var in ${VARS[@]}; do echo "Replacing '${var}' with '${!var}'" sed -i"" \ -e "s#%%${var}%%#${!var}#g" \ "${FILES[@]}" done if [ -n "${VERBOSE}" ]; then cat ${FILES[@]} fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor