From aa4f7f89e2a091df4760e0fbe92328a863479592 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Sun, 5 Feb 2017 11:19:56 +0100 Subject: Add basic build option printout --- kerl | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/kerl b/kerl index 8a6eb8b..c96877d 100755 --- a/kerl +++ b/kerl @@ -931,7 +931,7 @@ build_plt() do_plt() { - ACTIVE_PATH=`get_active_path` + ACTIVE_PATH="$1" if [ -n "$ACTIVE_PATH" ]; then plt=$ACTIVE_PATH/dialyzer/plt if [ -f "$plt" ]; then @@ -948,6 +948,19 @@ do_plt() fi } +print_buildopts() +{ + buildopts="$1/$KERL_CONFIG_STORAGE_FILENAME" + if [ -f "$buildopts" ]; then + echo "The build options for the active installation are:" + cat "$buildopts" + return 0 + else + echo "The build options for the active installation are not available." + return 1 + fi +} + do_deploy() { if [ -z "$1" ]; then @@ -1545,7 +1558,7 @@ case "$1" in fi ;; plt) - if ! do_plt; then + if ! do_plt get_active_path; then exit 1; fi ;; @@ -1557,7 +1570,14 @@ case "$1" in list_print installations echo "----------" if do_active; then - do_plt + ACTIVE_PATH=`get_active_path` + if [ -n "$ACTIVE_PATH" ]; then + do_plt "$ACTIVE_PATH" + print_buildopts "$ACTIVE_PATH" + else + echo "No Erlang/OTP installation is currently active." + exit 1 + fi fi exit 0 ;; -- cgit v1.2.3