summaryrefslogtreecommitdiff
path: root/include/lib.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-27 03:41:30 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-27 03:41:30 +0100
commit7b8c2bd412f84c691e42f8d341184d17726ed02a (patch)
tree3a3642752435bdb38522b750e141f5b2932afc3a /include/lib.sh
parentffdecb0ce191e1251d2ee78cf0b8ae9124346a6a (diff)
lib.sh: condense e() a bit
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/lib.sh')
-rwxr-xr-xinclude/lib.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/lib.sh b/include/lib.sh
index cac6b302..1e860794 100755
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -56,8 +56,7 @@ setcfg()
e()
{
- es_t="e"
- [ $# -gt 1 ] && es_t="$2"
+ es_t="e" && [ $# -gt 1 ] && es_t="$2"
es2="already exists"
estr="[ -$es_t \"\$1\" ] || return 1"
[ $# -gt 2 ] && estr="[ -$es_t \"\$1\" ] && return 1" && es2="missing"