summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-12-22 09:46:43 +0000
committerLeah Rowe <leah@libreboot.org>2023-12-22 10:24:00 +0000
commitab65ea4c99af4f5569496c58b604ada612a2469a (patch)
tree6feb004f23060a471653ad6d1820de6eea91d878 /script
parentfa25414bab5ca9e487bd265f0709e90e41769c69 (diff)
general code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/build/roms7
-rwxr-xr-xscript/update/release5
-rwxr-xr-xscript/vendor/download3
-rwxr-xr-xscript/vendor/inject3
4 files changed, 7 insertions, 11 deletions
diff --git a/script/build/roms b/script/build/roms
index 39808098..03dce95e 100755
--- a/script/build/roms
+++ b/script/build/roms
@@ -164,9 +164,8 @@ build_dependency_seabios()
build_dependency_grub()
{
- [ "${payload_grub}" != "y" ] && \
- [ "${payload_seabios_withgrub}" != "y" ] && \
- [ "${payload_seabios_grubonly}" != "y" ] && return 0
+ [ "$payload_grub" != "y" ] && [ "$payload_seabios_withgrub" != "y" ] \
+ && [ "${payload_seabios_grubonly}" != "y" ] && return 0
rebuild_grub="n"
[ -f "${grubelf}" ] || rebuild_grub="y"
@@ -418,7 +417,7 @@ moverom() {
[ "${vendorfiles}" = "n" ] && newrom="${newrom%.rom}_noblobs.rom"
printf "Creating target image: %s\n" "${newrom}"
- [ -d "${newrom%/*}" ] || x_ mkdir -p "${newrom%/*}/"
+ x_ mkdir -p "${newrom%/*}"
x_ cp "${rompath}" "${newrom}"
}
diff --git a/script/update/release b/script/update/release
index b762b89d..14878569 100755
--- a/script/update/release
+++ b/script/update/release
@@ -179,7 +179,7 @@ handle_rom_archive()
insert_version_files "${romdir}" || \
err "mkrom_tarball ${romdir}: versionfile"
- insert_copying_files "${romdir}" || err "!insert copy, handle 2, ${romdir}"
+ insert_copying_files "$romdir" || err "!insert copy, handle 2, $romdir"
mkrom_tarball
}
@@ -233,8 +233,7 @@ strip_ucode()
insert_copying_files()
{
- rm -Rf "${1}/licenses" || return 1
- mkdir -p "${1}/licenses" || return 1
+ remkdir "${1}/licenses"
l="${1}/licenses"
# copy licenses to rom image archive, for completion
cp "src/grub/COPYING" "${l}/COPYING.grub" || return 1
diff --git a/script/vendor/download b/script/vendor/download
index 736d8cc5..7913b558 100755
--- a/script/vendor/download
+++ b/script/vendor/download
@@ -146,8 +146,7 @@ mkdirs()
return 1
fi
mkdir -p "${1%/*}" || err "mkdirs: !mkdir -p ${1%/*}"
- x_ rm -Rf "${appdir}"
- x_ mkdir -p "${appdir}/"
+ remkdir "${appdir}"
if [ "${is_rom}" = "y" ]; then
cp "${_dl}" "${appdir}" || \
err "mkdirs copyrom ${_dl}: can't copy to appdir"
diff --git a/script/vendor/inject b/script/vendor/inject
index e740704a..7ae4fc02 100755
--- a/script/vendor/inject
+++ b/script/vendor/inject
@@ -114,8 +114,7 @@ inject_vendorfiles()
patch_release_roms()
{
_tmpdir="tmp/romdir"
- x_ rm -Rf "${_tmpdir}"
- x_ mkdir -p "${_tmpdir}"
+ remkdir "${_tmpdir}"
tar -xf "${archive}" -C "${_tmpdir}" || \
err "patch_release_roms: !tar -xf \"${archive}\" -C \"${_tmpdir}\""