Removes debug thing, which was causing it to crash
This commit is contained in:
parent
d6850f056c
commit
999eb18fcc
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo 'Substituting environment variables...'
|
||||||
|
|
||||||
# The first parameter is a comma-delimited list of paths to files which should be substituted
|
# The first parameter is a comma-delimited list of paths to files which should be substituted
|
||||||
if [[ -z $1 ]]; then
|
if [[ -z $1 ]]; then
|
||||||
echo 'ERROR: No target files given.'
|
echo 'ERROR: No target files given.'
|
||||||
|
@ -7,16 +9,17 @@ if [[ -z $1 ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
env_list='\$PRODUCTION \$API_URL \$IRB_URL \$HOME_ROUTE \$PORT0'
|
env_list='\$PRODUCTION \$API_URL \$IRB_URL \$HOME_ROUTE \$PORT0'
|
||||||
for i in $(echo $1 | sed "s/,/ /g")
|
for file_path in $(echo $1 | sed "s/,/ /g")
|
||||||
do
|
do
|
||||||
# Replace strings in the given file(s) in env_list
|
echo "replacing $env_list in $file_path"
|
||||||
envsubst "$env_list" < "$i" > "$i".tmp && mv "$i".tmp "$i"
|
|
||||||
|
|
||||||
# Set DEBUG=true in order to log the replaced file
|
# Replace strings in the given file(s) in env_list
|
||||||
if [ "$DEBUG" = true ] ; then
|
envsubst "$env_list" < "$file_path" > "$file_path".tmp && mv "$file_path".tmp "$file_path"
|
||||||
exec cat $i
|
|
||||||
fi
|
echo '...'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo 'Finished substituting environment variables.'
|
||||||
|
|
||||||
# Execute all other commands with parameters
|
# Execute all other commands with parameters
|
||||||
exec "${@:2}"
|
exec "${@:2}"
|
||||||
|
|
Loading…
Reference in New Issue