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

Rewrite the install script #14

Merged
merged 1 commit into from
Oct 30, 2017

Conversation

arcticicestudio
Copy link
Contributor

@arcticicestudio arcticicestudio commented Oct 28, 2017

Closes #13
Fixes #12
Fixes #6
Fixes #3

Default installation

Installation with --loglevel 4 option

Custom profile installation (--profile myprofile)

Version conflict confirmation

[Prehistory]

The profile script was no more usable due to a undocumented behavior
of "dconf resulting in whether overriden profiles or error messages.
The logic of the script worked previously, but the "dconf" or
"gsettings" API changed breaking the script (forks of "terminal.sexy"(1))
which's logic is used by almost all GNOME Terminal theme projects.

I've reported #789056 to the official GNOME bug tracker for the "dconf
component which got closed with the following reason:

> This is simply an error in your script: you're using dconf to read keys
that have never been written to. You need to use the gsettings tool
instead, which takes into account the schema so it can return the default
value in that case.

I tried to find the documentation where this behavior of "dconf" is
described, but it seems like this knowledge is only documented in the
code itself or internal developer documents.

[Description]

Since the script was never really optimized I decided to rewrite it to
fix issues like GH-12 and GH-3 and implement the following additional
features:

  * Profile Handling - the script is now able to detect available
  profiles and
    * clone the default profile if no specific profile has been
    specified - The script is able to get the UUID of the "default"
    profile and clone it
    * install the theme for a specific profile - the user can pass the
    name of the profile the theme should be installed to
    * handle already existing "Nord" profiles via version comparison -
    if the "Nord" profile already exists and the script version is less
    than the installed version the user must confirm whether to override
    the theme of abort the installation, otherwise the profile will be
      * updated if the script version is greater than the installed
        version
      * reinstalled if the installed version is equal to the script
        version
  * Log Level - the script now provides a option to allow the user to
    define the log level. Available log levels are
      * 0 - ERROR
      * 1 - WARNING
      * 2 - SUCCESS (default)
      * 3 - INFO
      * 4 - DEBUG
  * Dependency Management -  the script is able to validate all required
    dependencies to ensure the script can run on the executive
    environment which includes
    * dconf (dconf)
    * expr (coreutils)
    * gsettings (glib2)
    * uuidgen (util-linux)

References:
  (1) https://terminal.sexy
  (2) https://bugzilla.gnome.org/show_bug.cgi?id=789056

Fixes GH-12 and GH-3

GH-13
@arcticicestudio arcticicestudio self-assigned this Oct 28, 2017
@arcticicestudio arcticicestudio added type-feature Hacktoberfest This repository participates in the Hacktoberfest labels Oct 28, 2017
@arcticicestudio arcticicestudio added this to the 0.2.0 milestone Oct 28, 2017
@arcticicestudio arcticicestudio merged commit 3566a14 into develop Oct 30, 2017
@arcticicestudio arcticicestudio deleted the feature/gh-13-rewrite-install-script branch October 30, 2017 17:56
@arcticicestudio arcticicestudio removed their assignment Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest This repository participates in the Hacktoberfest type-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants