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

Updater Scripts #62

Closed
overdodactyl opened this issue Feb 12, 2018 · 5 comments
Closed

Updater Scripts #62

overdodactyl opened this issue Feb 12, 2018 · 5 comments

Comments

@overdodactyl
Copy link
Owner

overdodactyl commented Feb 12, 2018

This is a continuation of topics brought up in #19 and #36.

I've received a number of questions regarding installation, being able to customize the accent colors, changing the Internal UUIDs etc., and how have these changes carry over after updating to the latest ShadowFox version. Most of these questions have come from people making use of just userContent.css and userChrome.css (i.e. not the imports versions or using any gulp tasks...which I'm guessing is about 90% of people).

To address this, I've created a simple bash script that will take care of (1) installation, (2) updating, and (3) overriding any color preferences or UUIDs. The script is found here.

In short, this script should be placed in your Firefox directory (not your chrome folder). When ran, it creates a chrome folder if it doesn't exist. Inside the chrome folder, if a userChrome.css and/or a userContent.css file exists, it backs them up. Then, it downloads the latest versions from this repository. Finally, it overrides any color variables or UUIDs defined inside the script.

I'm hoping this will be of help. If anyone has any suggested changes, different use cases you would like it to apply to (i.e. if you're using the import files, git, gulp, etc.), or anything else, feel free to let me know! This is just a first pass at it.

I've tested it on a Mac, and it should work on Linux I believe, but I am unable to test that (if anyone could let me know whether or not it works, that would be great).

Lastly, I'm hoping to find a Windows user that can help me write/test a Windows version of this script. @CaptaPraelium would you still have time/be interested in doing so? Never mind, @CarlColijn is helping out :)

@mac1202
Copy link

mac1202 commented Feb 13, 2018

Just tested it on manjaro linux but it doesnt work for me here's the output

\nThis script should be run from your inside your Firefox profile.\n
Updating userContent.css and userChrome.css for Firefox profile:\n/home/mac/.mozilla/firefox/a4729fg7.default-1461789528544-1511192029762/chrome\n
Your current userContent.css file for this profile will be backed up and the latest ShadowFox version from github will take its place.
Your current userChrome.css file for this profile will be backed up and the latest ShadowFox version from github will take its place.
Continue Y/N? y\n\n
Your previous userChrome.css file was backed up: userChrome.backup.2018-02-13_1918
Your previous userContent.css file was backed up: userContent.backup.2018-02-13_1918
downloading latest ShadowFox userChrome.css file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 27138  100 27138    0     0  55839      0 --:--:-- --:--:-- --:--:-- 55724
ShadowFox userChrome.css has been downloaded
downloading latest ShadowFox userContent.css file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 63407  100 63407    0     0   143k      0 --:--:-- --:--:-- --:--:--  143k
ShadowFox userContent.css has been downloaded
sed: can't read s/--primary-accent-color: var(--blue-40);/--primary-accent-color: #279f27;/: No such file or directory
sed: can't read s/--primary-accent-color: var(--blue-40);/--primary-accent-color: #279f27;/: No such file or directory
sed: can't read s/--primary-accent-color-dark: var(--blue-50);/--primary-accent-color-dark: #228b22;/: No such file or directory
sed: can't read s/--primary-accent-color-dark: var(--blue-50);/--primary-accent-color-dark: #228b22;/: No such file or directory
sed: can't read s/--primary-accent-color-darkest: var(--blue-60);/--primary-accent-color-darkest: #006100;/: No such file or directory
sed: can't read s/--primary-accent-color-darkest: var(--blue-60);/--primary-accent-color-darkest: #006100;/: No such file or directory
sed: can't read s/9eba7fab-892c-7b42-a57e-b876d4196d70/32818407-cb70-5d40-9f8d-81ed9f2012a6/: No such file or directory

@overdodactyl
Copy link
Owner Author

overdodactyl commented Feb 13, 2018

Thanks for testing it @mac1202!

The output is a little sloppy with \n being printed literally instead of used as a new line character. I might need to change all my echo commands to echo -e's to prevent that from happening.

As for the actual progress of the script, it looks like it successfully backed up your user*css files, downloaded the latest versions of ShadowFox, but then failed the variable replacements portion...is that correct?

@overdodactyl
Copy link
Owner Author

overdodactyl commented Feb 13, 2018

Looks like there's a difference between mac's and linux's syntax for sed. sed -i '' replaces in place on mac, but on linux it tries to replace in a file named ''.

I've added a new version specific for Linux here if you don't mind giving that a try at some point :)

@mac1202
Copy link

mac1202 commented Feb 14, 2018

This version seems to work properly.

@CaptaPraelium
Copy link

Finally got time to try this on windows. Works like a charm, including my custom stuff too. Also fixed the white background since ff60. Great, great, great.

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

No branches or pull requests

3 participants