option.sh: remove insert_version_files()

it's only called once, from this file, within a small
function, and the function itself is very small.

remove, and put the contents of the function in the
calling function.

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-05-15 00:45:01 +01:00 committed by Leah Rowe
parent ca1806f20e
commit 422d36a07c
1 changed files with 4 additions and 8 deletions

View File

@ -167,7 +167,10 @@ check_project()
mktar_release()
{
x_ insert_version_files "$1"
printf "%s\n" "${version}" > "${1}/version" || return 1
printf "%s\n" "${versiondate}" > "${1}/versiondate" || return 1
printf "%s\n" "${projectname}" > "${1}/projectname" || return 1
mktarball "$1" "${1}.tar.xz"
x_ rm -Rf "$1"
}
@ -200,10 +203,3 @@ mksha512sum()
$err "!sha512sum \"${1}\" > \"${2}\""
) || $err "failed to create tarball checksum"
}
insert_version_files()
{
printf "%s\n" "${version}" > "${1}/version" || return 1
printf "%s\n" "${versiondate}" > "${1}/versiondate" || return 1
printf "%s\n" "${projectname}" > "${1}/projectname" || return 1
}