escape character for envsubst

escape character for envsubst
This commit is contained in:
AnJia 2018-07-03 09:57:43 +08:00 committed by GitHub
parent 216e6d978e
commit b065169fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ function commit()
ns=($(cat ./gcr_namespaces 2>/dev/null || echo google-containers)) ns=($(cat ./gcr_namespaces 2>/dev/null || echo google-containers))
readme=./gcr.io_mirror/README.md readme=./gcr.io_mirror/README.md
export current_date=$(date +'%Y-%m-%d %H:%M') export current_date=$(date +'%Y-%m-%d %H:%M')
envsubst < README.tpl >"${readme}" cat README.tpl | envsubst '$user_name $current_date' > "${readme}"
echo -e "Mirror ${#ns[@]} namespaces image from gcr.io\n-----\n\n" >> "${readme}" echo -e "Mirror ${#ns[@]} namespaces image from gcr.io\n-----\n\n" >> "${readme}"
for n in ${ns[@]} ; do for n in ${ns[@]} ; do