Skip to content
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

WIP: Tidy up preload script #2595

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

WIP: Tidy up preload script #2595

wants to merge 6 commits into from

Conversation

trn1ty
Copy link

@trn1ty trn1ty commented May 20, 2024

This is a set of optimizations and cleanups for preload.

@theofficialgman
Copy link
Collaborator

the if/else conversion to case statements are fine but I fail to see how anything else is an improvement... it looks harder to read/understand and is multiple lines longer.

@theofficialgman
Copy link
Collaborator

also shellcheck shows a syntax error. refer to the action log

@@ -37,25 +37,18 @@ function error {
exit 1
}

#yad or xlunch format
case "$1" in
source) return 0 ;;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preload script is not to be sourced. Why has this input argument been added?

fi
# The prefix is a category to preload. By default (if '/' or empty) the main
# page is preloaded.
test "$2" = / || prefix="$2"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this breaks the prefix variable and thus the preload script, it is no longer set when it is not /

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants