Repository navigation
some fixes #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
some fixes #38
Changes from all commits
03cd446
a7980d7
ed4efb8
195b076
d44565f
e7b6505
90c0353
b6a0f54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,30 +3,24 @@ | |
| # https://github.com/lunarcloud/script-dialog | ||
| # LGPL-2.1 license | ||
|
|
||
| # Get the directory where this script is located | ||
| # get the directories | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment change doesn't make sense. Only one directory is being gathered by the following line(s) still |
||
| SCRIPT_DIALOG_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
| CURRENT_FILE="$(realpath -- "${BASH_SOURCE[0]}")" | ||
|
|
||
| # Source all modular components | ||
| # shellcheck source=./init.sh | ||
| source "${SCRIPT_DIALOG_DIR}/init.sh" | ||
| # sources everything in folder, excludes current file | ||
| for src in ./*.sh | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer a finite list rather than an unbounded "all in folder" for obvious security reasons |
||
| do | ||
| [[ "$(realpath -- "$src")" == "$CURRENT_FILE" ]] && continue | ||
| source "$src" || exit 1 | ||
| #echo "$src" | ||
| done | ||
|
|
||
| # shellcheck source=./helpers.sh | ||
| source "${SCRIPT_DIALOG_DIR}/helpers.sh" | ||
| # execute told function | ||
| if declare -f "$1" >/dev/null; then | ||
| "$1" | ||
| else | ||
| echo "Function not found" | ||
| fi | ||
|
|
||
| # shellcheck source=./messages.sh | ||
| source "${SCRIPT_DIALOG_DIR}/messages.sh" | ||
| # the rest goes there | ||
|
|
||
| # shellcheck source=./inputs.sh | ||
| source "${SCRIPT_DIALOG_DIR}/inputs.sh" | ||
|
|
||
| # shellcheck source=./lists.sh | ||
| source "${SCRIPT_DIALOG_DIR}/lists.sh" | ||
|
|
||
| # shellcheck source=./progressbar.sh | ||
| source "${SCRIPT_DIALOG_DIR}/progressbar.sh" | ||
|
|
||
| # shellcheck source=./pickers.sh | ||
| source "${SCRIPT_DIALOG_DIR}/pickers.sh" | ||
|
|
||
| # shellcheck source=./datepicker.sh | ||
| source "${SCRIPT_DIALOG_DIR}/datepicker.sh" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is just an alias without any "if platform do a, else do b" logic and has no documentation comments. Doesn't belong in this library.