diff options
author | Raphaël Hertzog <raphael@offensive-security.com> | 2020-04-23 22:17:23 +0200 |
---|---|---|
committer | Raphaël Hertzog <raphael@offensive-security.com> | 2020-04-24 15:37:13 +0200 |
commit | 104fa2039990f17e02dd9d2dbfc801763987b532 (patch) | |
tree | cd9dee68001aaa2d40ac5eb3f057e959ec478b90 /frontend/lb | |
parent | 58e0efedc965e1ace6ef65205d831405650cdddb (diff) | |
download | vyos-live-build-104fa2039990f17e02dd9d2dbfc801763987b532.tar.gz vyos-live-build-104fa2039990f17e02dd9d2dbfc801763987b532.zip |
Revert "frontend: properly handle option processing"
This reverts commit 6b7c8ed4bf15175299729355f04d60dcbac1aded as it's
breaking multi-value space-separated parameters.
Diffstat (limited to 'frontend/lb')
-rwxr-xr-x | frontend/lb | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/frontend/lb b/frontend/lb index 67261a0aa..298b4255b 100755 --- a/frontend/lb +++ b/frontend/lb @@ -19,14 +19,25 @@ DESCRIPTION="Utility to build live systems" HELP="" USAGE="lb {clean|config|build}" -# Handle options up to any command -# We replace the arg set with any remaining args on return -Arguments frontend "${@}" -eval set -- "${REMAINING_ARGS}" +case "${1}" in + -h|--help) + if [ $(which man) ]; then + man lb + else + Usage + fi + exit 0 + ;; -if [ -z "${1}" ]; then - Usage --fail -fi + ""|-u|--usage) + Usage + ;; + + -v|--version) + echo "${VERSION}" + exit 0 + ;; +esac COMMAND="${1}" shift |