File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,11 @@ for type in selected available ; do
169169 [ -d %{i}/tools/${type} ] || continue
170170 for xml in $(ls %{i}/tools/${type}/*.xml) ; do
171171 tool=$(basename $xml)
172- echo "cat << \\EOF_TOOLFILE >> %%{i}/tools/${type}/${tool}" >> %{i}/tools/${type}.tmpl
173- cat $xml >> %{i}/tools/${type}.tmpl
174- echo "EOF_TOOLFILE" >> %{i}/tools/${type}.tmpl
175- echo "" >> %{i}/tools/${type}.tmpl
172+ echo "cat << \\EOF_TOOLFILE >> %%{i}/tools/${type}/${tool}" > tmp-tool.txt
173+ cat $xml >> tmp-tool.txt
174+ echo -e "\nEOF_TOOLFILE\n" >> tmp-tool.txt
175+ grep -v '^\s*$' tmp-tool.txt >> %{i}/tools/${type}.tmpl
176+ rm -f tmp-tool.txt
176177 done
177178 rm -rf %{i}/tools/${type}
178179done
Original file line number Diff line number Diff line change @@ -20,10 +20,11 @@ touch ${tmpl}
2020if [ -d %{i}/tools/selected ] ; then
2121 for xml in $(ls %{i}/tools/selected/*.xml) ; do
2222 tool=$(basename $xml)
23- echo "cat << \\EOF_TOOLFILE >> %%{i}/etc/scram.d/${tool}" >> ${tmpl}
24- cat $xml >> ${tmpl}
25- echo "EOF_TOOLFILE" >> ${tmpl}
26- echo "" >> ${tmpl}
23+ echo "cat << \\EOF_TOOLFILE >> %%{i}/etc/scram.d/${tool}" > tmp-tool.txt
24+ cat $xml >> tmp-tool.txt
25+ echo -e "\nEOF_TOOLFILE\n" >> tmp-tool.txt
26+ grep -v '^\s*$' tmp-tool.txt >> ${tmpl}
27+ rm -f tmp-tool.txt
2728 done
2829fi
2930
You can’t perform that action at this time.
0 commit comments