mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-20 05:30:25 +02:00
mk: tidy up xbmk_sanitize_version
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+3
-7
@@ -44,13 +44,9 @@ version()
|
||||
|
||||
xbmk_sanitize_version()
|
||||
{
|
||||
[ -z "$version" ] && \
|
||||
return 0
|
||||
|
||||
version="`printf '%s\n' "$version" | sed \
|
||||
's/[[:space:]]//g; s/\.\.//g; s/\.\///g; s/\//-/g; s/^-//'`"
|
||||
|
||||
[ -z "$version" ] && \
|
||||
[ -n "$version" ] && version="`printf '%s\n' "$version" | sed \
|
||||
's/[[:space:]]//g; s/\.\.//g; s/\.\///g; s/\//-/g; s/^-//'`" \
|
||||
&& [ -z "$version" ] && \
|
||||
err "'version' empty after sanitization" \
|
||||
"xbmk_sanitize_version" "$@"; :
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user