summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-03 11:07:07 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-03 11:07:07 +0100
commit53dd4bc4dd86cc490f5b481e8644fa58511820fb (patch)
treefd7a06d1197149f93288d06d159132766a14fd90 /include
parentc2793e7a5ea931a77e119e593204a79c06870e53 (diff)
lib.sh: more friendly output from e()
already of saying "found", say "already exists" this means the output of these commands more user friendly and intuitive: ./update trees -b grub default ./update trees -b coreboot i945 this is just an example. when an ELF file already exists, the build is skipped even if src isn't downloaded. this design is intentional, because it means that you can use previous builds if you want to save time on another. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rwxr-xr-xinclude/lib.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 5ae34818..b335ace3 100755
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -201,10 +201,10 @@ e()
{
es_t="e"
[ $# -gt 1 ] && es_t="$2"
- es2=""
+ es2="already exists"
estr="[ -$es_t \"\$1\" ] || return 1"
- [ $# -gt 2 ] && estr="[ -$es_t \"\$1\" ] && return 1" && es2="not "
+ [ $# -gt 2 ] && estr="[ -$es_t \"\$1\" ] && return 1" && es2="not found"
eval "$estr"
- printf "%s %sfound\n" "$1" "$es2" 1>&2
+ printf "%s %s\n" "$1" "$es2" 1>&2
}