buildpkg.packaging: simplify variable expansion for relnotes
Pick up only the variable names and not the values from the instrumented build.sh to avoid double expansion of self-referencing assignments. Instead we get the values from the running environment.
This commit is contained in:
parent
54976188a5
commit
4f1c76c750
@ -1111,7 +1111,7 @@ auto_rel()
|
|||||||
[ -r "$metadir/sums" ] && temp_source_sha1sum="$(cat $metadir/sums | ${__awk} '{ printf "%s\\n",$0 }')"
|
[ -r "$metadir/sums" ] && temp_source_sha1sum="$(cat $metadir/sums | ${__awk} '{ printf "%s\\n",$0 }')"
|
||||||
source_sha1sum="${temp_source_sha1sum%\\*}"
|
source_sha1sum="${temp_source_sha1sum%\\*}"
|
||||||
# End of SHA1 sum computing
|
# End of SHA1 sum computing
|
||||||
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh >> /tmp/env.sh; bash /tmp/env.sh|${__grep} ^ENV|${__sed} -e 's/ENV //g'|${__awk} '{ printf "%s\\n",$0 }' && ${__rm} -f /tmp/env.sh)"
|
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh | ${__bash} | ${__sed} -n 's/^ENV \([^=]*\)=.*/echo \1=$\1/p' | ${__bash} | ${__awk} '{ printf "%s\\n",$0 }')"
|
||||||
# Remove trailing \n
|
# Remove trailing \n
|
||||||
local extracted_env="${temp_extracted_env%\\*}"
|
local extracted_env="${temp_extracted_env%\\*}"
|
||||||
if [ -r ${depends}_all ]; then
|
if [ -r ${depends}_all ]; then
|
||||||
|
@ -404,7 +404,7 @@ auto_rel()
|
|||||||
source_sha1sum="${temp_source_sha1sum%\\*}"
|
source_sha1sum="${temp_source_sha1sum%\\*}"
|
||||||
### End of SHA1 sum computing
|
### End of SHA1 sum computing
|
||||||
### Extract environtment variables
|
### Extract environtment variables
|
||||||
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh >> /tmp/env.sh; bash /tmp/env.sh|${__grep} ^ENV|${__sed} -e 's/ENV //g'|${__awk} '{ printf "%s\\n",$0 }' && ${__rm} -f /tmp/env.sh)"
|
local temp_extracted_env="$(${__sed} -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh | ${__bash} | ${__sed} -n 's/^ENV \([^=]*\)=.*/echo \1=$\1/p' | ${__bash} | ${__awk} '{ printf "%s\\n",$0 }')"
|
||||||
# Remove trailing \n
|
# Remove trailing \n
|
||||||
local extracted_env="${temp_extracted_env%\\*}"
|
local extracted_env="${temp_extracted_env%\\*}"
|
||||||
###
|
###
|
||||||
|
Loading…
x
Reference in New Issue
Block a user