summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-12-24 09:04:36 +0000
committerLeah Rowe <leah@libreboot.org>2023-12-24 09:04:36 +0000
commit0aca6332ee5865dbf4717235cbf9f5e8e79dddc3 (patch)
treecbb2a18ec22213208ab3dcaf22eebbb84fb14e5e /build
parent575332f2219c9e6f435b7ed35bfb2a408de0628c (diff)
lbmk scripts: shorter code lines
while seemingly pedantic, this does actually make code easier to read. mostly just switching to shorthand for variable names, where no expansions or patterns are used Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'build')
-rwxr-xr-xbuild12
1 files changed, 6 insertions, 6 deletions
diff --git a/build b/build
index b005a3bb..214cec30 100755
--- a/build
+++ b/build
@@ -38,7 +38,7 @@ main()
xx_ id -u 1>/dev/null 2>/dev/null
[ $# -lt 1 ] && fail "Too few arguments. Try: ${0} help"
- [ "${1}" = "dependencies" ] && xx_ install_packages $@ && lbmk_exit 0
+ [ "$1" = "dependencies" ] && xx_ install_packages $@ && lbmk_exit 0
for cmd in initcmd check_git check_project git_init excmd; do
eval "${cmd} \$@"
@@ -78,7 +78,7 @@ install_packages()
xx_ ${pkg_add} ${pkglist}
[ -z "${aur_notice}" ] && return 0
- printf "You must install AUR packages: %s\n" "${aur_notice}" 1>&2
+ printf "You must install AUR packages: %s\n" "$aur_notice" 1>&2
}
# release archives contain .gitignore, but not .git.
@@ -93,7 +93,7 @@ git_init()
git add -A . || fail "${PWD}: cannot add files to Git repository"
git commit -m "${projectname} ${version}" --date "${cdate}" \
--author="lbmk <lbmk@libreboot.org>" || \
- fail "${PWD}: can't commit ${projectname}/${version}, date ${cdate}"
+ fail "$PWD: can't commit ${projectname}/${version}, date $cdate"
git tag -a "${version}" -m "${projectname} ${version}" || \
fail "${PWD}: cannot git-tag ${projectname}/${version}"
}
@@ -125,19 +125,19 @@ usage()
mkversion()
{
- printf "revision: %s %s\n" "${projectname}" "${version}"
+ printf "revision: %s %s\n" "$projectname" "$version"
printf "revision date: %s\n" "$(date -Rud @${versiondate})"
}
lbmk_exit()
{
- tmp_cleanup || err "lbmk_exit: can't rm tmpdir upon exit $1: ${tmpdir}"
+ tmp_cleanup || err "lbmk_exit: can't rm tmpdir upon exit $1: $tmpdir"
exit $1
}
fail()
{
- tmp_cleanup || printf "WARNING: can't rm tmpdir: %s\n" "${tmpdir}" 1>&2
+ tmp_cleanup || printf "WARNING: can't rm tmpdir: %s\n" "$tmpdir" 1>&2
err "${1}"
}