mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 21:07:54 +00:00
scripts: Save toolchain config as regular file
Since commit 16c6cc99
("Save the toolchain configuration to its own
file, as an auto-extracting shell script:") we've been saving the
configuration as a self extracting script. This is a little non-obvious
as it looks like it should be a regular file but the bzipped payload
means it can be easily inspected. It may also cause alarm for users who
should rightly be suspicious of unexpected binaries that get shipped
along with packaged toolchains. It also assumes that bzip2 (or at least
bzcat) is available on the machine running the toolchain.
Instead of the self extracting shell script save the config as a regular
compressed file with an obvious file extension.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
This commit is contained in:
parent
b6a4766d22
commit
5a1dc8d95d
@ -2539,8 +2539,7 @@ CT_InstallConfigurationFile()
|
||||
local path="${1}"
|
||||
local suffix="${2}"
|
||||
|
||||
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
|
||||
CT_DoExecLog DEBUG ${install} -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${suffix}.config"
|
||||
CT_DoExecLog DEBUG ${sed} -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${suffix}.config"
|
||||
bzip2 -c -9 "${path}" >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-${suffix}.config"
|
||||
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/share"
|
||||
CT_DoExecLog DEBUG ${install} -m 0644 "${path}" "${CT_PREFIX_DIR}/share/${CT_TARGET}-${suffix}.config"
|
||||
CT_DoExecLog DEBUG bzip2 -9 "${CT_PREFIX_DIR}/share/${CT_TARGET}-${suffix}.config"
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
tail -n+5 "${0}" |bzcat
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user