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

Fix141 #151

Merged
7 commits merged into from
Dec 30, 2016
Merged

Fix141 #151

7 commits merged into from
Dec 30, 2016

Conversation

ghost
Copy link

@ghost ghost commented Dec 30, 2016

This pull request will optimize existing script for better behaviour and results. See #141 for early discussion on changes prior to this. Following are notable changes made to the INSTALL script.

Improved functions and be modular

  • functions for "direct action" uses only commands, no added text
  • functions under "support action" and "choice" groups functions, being particular and selective
  • functions are easily called by using single function name under "choice" (avoid hassles to revise individual function calls from menu)
  • future additions shall be added to respective function group under "choice"

Consistent word choice

  • revise Renew INSTALL script to Download new script, if any (this follows the style of other word choice "Download foo and do something" style, indicates not necessarily new)
  • revise for deletion to to remove prior to running rm command to be consistent
  • ^C to abort (Control-C to abort) instead of longer text to cancel and exit

Adopt rule of silence

  • use --no-verbose option for wget, so least output will be shown rather than none
  • use 1>/dev/null to redirect lengthy standard output from make deb for reinstall action (only error output will be shown during reinstall)
  • common messages indicated by *** now appears only once per function under "choice" (once does not mean one line, but one time prior to running subsequent functions)

Improved actions

  • automate choice by limit read input to single character (no need to press ENTER key)
  • automate remove selective files so that reinstall process will use correct source and binary
  • rename and disable executable bit for old INSTALL script
  • prevent "false positive" new installation by checking source and binary beforehand
  • support uninstall via makefile, in case dpkg fails (but discourage to install via makefile)
  • reinstall doesn't require uninstall; dpkg handles installation properly when newer package has same or higher version than existing package (tested using dpkg 1.17.5 in Xubuntu 14.04).

Improved global variables

  • rename existing files with common prefix customizer via variable and basename (optimal use of coreutils: no additional dependencies, and no additional global variable either)
  • declare with read-only option for most global variables
  • new variables for web addresses for standard files URLS* and raw files URLR*

All changes have been tested prior to creating this pull request, in Xubuntu 14.04 on my main machine. Most of known behaviours can be handled by the script.

Note to myself @clearkimura: Use "squash and merge" for this time, due to multiple commits with repeated commit titles that involves only a single file.

clearkimura added 7 commits December 30, 2016 20:53
Initial clean up for optimization
Check files to clean, else exit function
Be selective to proceed. wget will show any error message. Exit function if file was not downloaded.
Support uninstall via makefile, in case dpkg fails. Remove logical AND to run all actions for the choice.
Be particular and selective before reinstall. Remove logical AND to run all actions for the choice.
Add missing variables for support action. Note that 'URLS' (for standard or source files) and 'URLR' (for raw files) are different.
Be sure to prevent "false positive" new installation. Also prevent users who had already installed binary.
@ghost ghost added this to the 4.1.4 milestone Dec 30, 2016
@ghost ghost self-assigned this Dec 30, 2016
@ghost ghost merged commit e0334d5 into master Dec 30, 2016
@ghost ghost deleted the fix141 branch December 30, 2016 21:12
@ghost ghost mentioned this pull request Jan 20, 2017
This pull request was closed.
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.

0 participants