From 104fa2039990f17e02dd9d2dbfc801763987b532 Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Thu, 23 Apr 2020 22:17:23 +0200 Subject: Revert "frontend: properly handle option processing" This reverts commit 6b7c8ed4bf15175299729355f04d60dcbac1aded as it's breaking multi-value space-separated parameters. --- frontend/lb | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'frontend/lb') 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 -- cgit v1.2.3