work around a bug in bash3, now tested with dash, bash, busybox

This commit is contained in:
Daniel Heule 2014-02-27 17:04:23 +01:00
parent 0198b99eb5
commit 727c918f67

View file

@ -80,30 +80,27 @@ case "$state_should" in
esac esac
cat <<__CDIST_HEREDOC_END_HERE_MARKER cat <<__CDIST_HEREDOC_END_HERE_MARKER
export state="\$(cat <<"__CDIST_INPUT_END_HERE_MARKER" IFS='\n' read -r state <<'__CDIST_INPUT_END_HERE_MARKER'
$state_should $state_should
__CDIST_INPUT_END_HERE_MARKER __CDIST_INPUT_END_HERE_MARKER
)" export state
export key="\$(cat <<"__CDIST_INPUT_END_HERE_MARKER" IFS='\n' read -r key <<'__CDIST_INPUT_END_HERE_MARKER'
$key $key
__CDIST_INPUT_END_HERE_MARKER __CDIST_INPUT_END_HERE_MARKER
)" export key
export value="\$(cat <<"__CDIST_INPUT_END_HERE_MARKER" IFS='\n' read -r value <<'__CDIST_INPUT_END_HERE_MARKER'
$(cat "$__object/parameter/value") $(cat "$__object/parameter/value")
__CDIST_INPUT_END_HERE_MARKER __CDIST_INPUT_END_HERE_MARKER
)" export value
export delimiter="\$(cat <<"__CDIST_INPUT_END_HERE_MARKER" IFS='\n' read -r delimiter <<'__CDIST_INPUT_END_HERE_MARKER'
$(cat "$__object/parameter/delimiter") $(cat "$__object/parameter/delimiter")
__CDIST_INPUT_END_HERE_MARKER __CDIST_INPUT_END_HERE_MARKER
)" export delimiter
export exact_delimiter="\$(cat <<"__CDIST_INPUT_END_HERE_MARKER" IFS='\n' read -r comment <<'__CDIST_INPUT_END_HERE_MARKER'
$exact_delimiter
__CDIST_INPUT_END_HERE_MARKER
)"
export comment="\$(cat <<"__CDIST_INPUT_END_HERE_MARKER"
$(cat "$__object/parameter/comment") $(cat "$__object/parameter/comment")
__CDIST_INPUT_END_HERE_MARKER __CDIST_INPUT_END_HERE_MARKER
)" export comment
export exact_delimiter="$exact_delimiter"
tmpfile=\$(mktemp "${file}.cdist.XXXXXXXXXX") tmpfile=\$(mktemp "${file}.cdist.XXXXXXXXXX")
# preserve ownership and permissions by copying existing file over tmpfile # preserve ownership and permissions by copying existing file over tmpfile