From 54ca3bd3293bd9815712d7d8aaf1fe45f13e5d5e Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 11 Oct 2019 12:41:11 +0200 Subject: [PATCH] fix direct 'scl_source --help' output Wrap everything into 'if then else fi' statement, so we don't actually need 'return' statement. Without this wrapping hack, we'd need either 'exit' statement (if executed by /usr/bin/scl_source) or 'return' for 'source scl_source'. For more info see #20. --- shell/scl_source | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/scl_source b/shell/scl_source index b0036bd..294740f 100755 --- a/shell/scl_source +++ b/shell/scl_source @@ -9,8 +9,7 @@ Options: if [ $# -eq 0 -o $1 = "-h" -o $1 = "--help" ]; then echo "$_scl_source_help" - return 0 -fi +else # main operation mode if [ -z "$_recursion" ]; then @@ -73,3 +72,5 @@ if [ $_recursion == "false" ]; then _scl_scriptlet_name="" _recursion="false" fi + +fi # main operation mode -- 2.23.0