From 42cb3214669a459cc62ba439804d4116a6bbfea2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 19 Jul 2022 00:41:12 +0300 Subject: [PATCH] now listing scripts... Signed-off-by: Alex A. Naanou --- post-install | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/post-install b/post-install index 4ebd7e2..3a39145 100644 --- a/post-install +++ b/post-install @@ -414,7 +414,6 @@ function @setupList(){ } - #---------------------------------------------------------------------- # config... @@ -429,6 +428,15 @@ function @setupList(){ #---------------------------------------------------------------------- # help and arguments... +function listScripts(){ + [ -d "$SCRIPT_DIR" ] \ + && echo "-" \ + && return 0 + + local scripts=( $(ls "$SCRIPT_DIR") ) + echo ${scripts/README} +} + function printhelp(){ cat << EOF Usage: $CMD [OPTIONS] @@ -455,6 +463,9 @@ Default features: Supported features: ${ALL_FEATURES[@]} +Available scripts: + $( listScripts ) + Examples: Only create dirs and links (features dir and user-link)... @@ -480,6 +491,7 @@ while ! [ -z "$1" ] ; do QUIET=1 shift ;; + # XXX introspection... -s|--source) [ -z "$2" ] \