diff options
Diffstat (limited to 'lbmk')
-rwxr-xr-x | lbmk | 20 |
1 files changed, 7 insertions, 13 deletions
@@ -93,20 +93,14 @@ install_packages() execute_command() { - case "${option}" in - list) - ./build command options "${buildpath}/${mode}" ;; - *) - if [ ! -d "${buildpath}/${mode}" ]; then - usage $0 - fail "Invalid mode '${mode}'. Run: ${0} help" - elif [ ! -f "${buildpath}/${mode}/${option}" ]; then - usage $0 - printf "Invalid option for '%s'." ${mode} 1>&2 - fail "Run: ${0} ${mode} list'." - fi + if [ "${option}" = "list" ]; then + ./build command options "${buildpath}/${mode}" + lbmk_exit 0 + elif [ ! -f "${buildpath}/${mode}/${option}" ]; then + fail "Invalid command. Run: ${linkpath} help" + else "${buildpath}/${mode}/${option}" $@ || fail "lbmk error" - esac + fi } usage() |