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

Script Updates #971

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open

Conversation

Heartnett
Copy link

@Heartnett Heartnett commented Nov 20, 2024

  • Script start-up performance improved
  • Help menu added
  • Shorthand script options added
  • 'Usage' section added to README
  • Options menu updated
  • '--force' parameter added to skip questions and accept license agreements (debug, install, and reinstall)
  • Partial fixes for Meta issue for 'failed to create symbolic link '/opt/displaylink/libstdc++.so.6' (Debian) #931
  • Structure added to script (main entry-point etc)
  • Duplicate code removed
  • Deprecated code refactored
  • General code refactored (if-else-if-else statements, case statements, variables, indentations, strings, variable expansions, etc)
  • Comments added
  • Minor bugs fixed
  • Nested functions moved into global scope
  • Variables renamed

- added "Usage" section
- whitespace trimmed
- function description comment added
- if condition inverted
- echo message rephrased
- renamed to "invalid_option"
- error message rephrased
- exits the script
- renamed to "get_xconfig_list"
- local variable introduced
- double quotes replaced with single quotes
- count_conf_in_etc variable removed
- renamed to "dependencies_check"
- function description comment updated
- local variables introduced
- missing script dependencies automatically installed (no user input required)
- apt command replaced with apt-get
- code refactored
- function replaced with cat command
- unsupported platform message added for Red Hat based linux distributions
- LSB string check simplified
- boolean strings replaced with actual boolean values
- code refactored
- renamed to "get_init_system"
- init system name detection simplified
- variables renamed
- code refactored
- function description comment added
- if-else-if statement replaced with case-in statement
- duplicate code patterns reduced to array and for loop
- function description comment added
- local variables introduced
- repeated strings moved into variables
- code refactored
- bug fixed where the cat command would append the script code instead of just writing it
- removed duplicate script code (already present in nvidia_xrandr function)
- nvidia_xrandr function called to complete the script code
- repeated code patterns reduced to an array with a for-loop
- function description comment added
- bug fixed when creating a symlink of libstd++.so.6 in a directory that might not exist
- check added to exit the script if the systemd displaylink-driver.service does not exist
- code refactored
- if-else-if-else statements replaced with case-in statement
- comments added
- ask_operation function removed
- single quotes used for strings which do not expand variables
- certain variables marked as read-only
- unused global 'kernel_check' variable removed
- 'resourcesDir' renamed with snake-case format (keep variable naming scheme the same)
- 'install' function's 'kernel_check' variable renamed to 'kernel_version' (makes more sense)
- comments added
- duplicate code pattern reduced to array and for-loop
- version checks will only occur for installs, reinstalls, and uninstalls
- 'get_displaylink_driver_version' and 'get_latest_displaylink_driver_version' functions introduced to handle DisplayLink driver version checking
- 'clean_up' function updated with parameters and error handling
- 'download' function refactored
- 'install' function refactored
- whitespaces removed
- 'kernel' variable renamed to 'kernel_release'
- duplicate "uname -r" statements refactored
- repeated directory paths moved into variables
- check added for potentially missing displaylink-installer.sh script
- system init daemon name retrieved once, since this value does not change
- 'get_init_system' function renamed to 'get_system_init_daemon'
- 'init_system' variable(s) replaced with global 'system_init_daemon' variable
- '--force' or '-f' parameter/flag added to allow users to skip all questions and automatically accept license agreements
- help menu updated
- script parameter parsing updated
- debug, install, and download functions updated
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.

1 participant