1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-11-25 16:47:37 +02:00
Commit Graph

22 Commits

Author SHA1 Message Date
Fini Jastrow
e398a3847c install.sh: Honor XDG_DATA_HOME
[why]
When a user sets the XDG_DATA_HOME environment variable the default of
$HOME/.local/share should not be used.

https://wiki.archlinux.org/title/XDG_Base_Directory

[how]
Enable XDG_DATA_HOME to override the default user data directory on Unix
and MacOS platforms.

There is some controversy if XDG_DATA_HOME should be honored on MacOS,
see for example platformdirs (link below). But me also working on Linux
and MacOS (and Windows) in parallel, I can not quite follow the
downsides and believe we should allow XDG_DATA_HOME also for MacOS.

Related: https://github.com/platformdirs/platformdirs/issues/4
Fixes: #1324

Suggested-by: Anthony Foglia <@afoglia>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-09-27 06:04:14 +02:00
Fini Jastrow
335a38d78f install.sh: Fix various ShellCheck issues
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-06-02 16:58:04 +02:00
Fini Jastrow
da651cf5a8 install.sh: Fix not working at all
[why]
The install script does not install anything after the 3.0.0 release.

[how]
Throw away all the (unused) patches stuff.
Throw away the compat stuff.
Introduce clean find patterns for all three Nerd Font variants.

Use them depending on the user's desire - also adding an option to
install the new proportional variants.

Additionally throw an error when we did not find any file (instead of
just failing in obscure ways).

[note]
Also output version number on runs.
Also remove some unused options in getopts.

Fixes: #1183

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-05-01 10:39:11 +02:00
Fini Jastrow
bd736c714d install.sh: Hint to dropped feature
I can not fix the script right now, this is postponed.
But still it should tell users that something is amiss.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-04-28 18:55:37 +02:00
Fini Jastrow
0a7d64b31c install.sh: Fix installing more than 2 fonts
[why]
The implode function can not work correctly because the bash pattern
expansion inserts blanks in unexpected places.

[how]
Use a dump loop instead of being smart.

Fixes: #280

Reported-by: Geoffrey Biggs <gbiggs>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-28 20:07:11 +01:00
Fini Jastrow
10f43c7b95 Fix various otf/ttf globs
[why]
I'm not sure why it has been in the code like this, and I removed these
strange globs already before in some places [1].

find -name "*.[o,t]tf"

actually allows
  *.otf
  *.ttf
  *.,tf

[how]
Remove spurious comma in all `find` calls.
Systematically.

[note]
Just some commits mentioned here:
  2ace3de8
  e7722458
  821ac681
  7bc729e2

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-01-26 09:36:27 +01:00
Fini Jastrow
a07648b1ee install.sh: Add uninstall command
[why]
Maybe people would like to uninstall the fonts installed with the
script.

In fact the uninstall could already be acieved by giving the --clean
option and installing no new font. Well, apart from the fact that the
scripts prevents runs with no installed font. And then the user must
specify the same installpath that has been used for the install, which
is a bit tedious.

[how]
Add new command '--remove' (with no short option).
Make -L / --list option a dry-run option for --remove.
Uninstall both possible installpaths.

Fixes: #407

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-09-14 12:33:07 +02:00
Fini Jastrow
533e1a2df4 install.sh: Remove patch-selecting options
[why]
We have only 'Complete' in the repo anymore, so it does not make sense
to provide commands to select un-complete patched fonts.

[how]
Leave stub/comment in so that - if there ever is a need to resurrect the
feature - one can find this commit and the deleted code.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-09-14 12:33:07 +02:00
Fini Jastrow
92fbcdb143 Rename 'Font Linux' to 'Font Logos'
[why]
The glyphs set's name changed, we should reflect that.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-09-13 08:05:14 +02:00
Ryan L McIntyre
7a4b5f872f Fixes build errors (ShellCheck) 2019-08-11 07:30:38 -07:00
Ryan L McIntyre
5d5c1b449e Fixes double negative expressions
ShellCheck rule SC2236
2019-08-11 00:14:43 -07:00
No GUI
1b36e2aa8a
Fix the negative error number
This fixes the shellcheck error. Running on my laptop, `exit -1` results in an actual return code of 255, so make that explicit.
2019-07-25 01:08:21 +00:00
Andrew Newman
e8e191a1be Update bash shebangs 2018-07-09 18:18:12 +03:00
Phuurl
d71100d58e Treats fc-cache return code of 1 as success prevent install.sh returning 1 2018-01-13 11:47:57 +00:00
Ryan L McIntyre
338b0c6bdc ShellCheck fixes WIP (related to #120) 2018-01-12 22:20:52 -05:00
Antoine Rahier
2b73bffaee Make the install script callable from everywhere
Installation would fail if you did not first cd in into the nerd-fonts
directory before running install.sh as $nerdfonts_root_dir referenced
${PWD} which is the path your shell is into when calling the script,
not the basepath of the script, parent of "patched-fonts".
2017-08-31 23:33:45 +02:00
Brennan Fee
435ac19b1d Tick version number up in install script.
Fully tested now.  Ticking version # up.
2017-07-29 22:14:41 -05:00
Brennan Fee
ab687375f3 Added support to intall fonts to global system path.
Allows execution 'sudo ./install.sh -S <fonts>' which will use the
global system install path rather than the users local path.
2017-07-29 22:08:20 -05:00
Xandor Schiefer
2cf5f12d17 Better installation script
It now has more options than copying all patched files or one font’s
patched font files.

In short, you can choose which patchset, which compatibility, which
method (copy or symlink), and which fonts you want to install.
2016-09-02 10:00:18 +02:00
David McKay
4ac26ee202 Allow a single font-family to be installed, instead of everything by default. 2016-05-14 11:54:45 -04:00
Shai Efrati
6799e03bed Fix font_dir on linux to be ~/.local/share/fonts as the previous was deprecated. 2016-01-06 09:27:27 +02:00
Srijan R Shetty
ae82f4234a Install script for Ubuntu 2015-02-24 21:16:42 +05:30