[WIP] Replace installation script with bash version that performs a more robust installation process#358
Open
robfrawley wants to merge 2 commits intopowerline:masterfrom
Open
[WIP] Replace installation script with bash version that performs a more robust installation process#358robfrawley wants to merge 2 commits intopowerline:masterfrom
robfrawley wants to merge 2 commits intopowerline:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The attached installation script is a clean-up version of what I've been using for the past few years when installing fonts from a number of sources, including this repository (
powerline/fonts) as well as others (likeryanoasis/nerd-fonts); I'm not sure if you'd want something this long to and bash-dependent to replace the simpleshscript, but I'll enumerate the additional features here and let the community and yourself decide its merit.INSTALL_FONT_ROOT_PATHenvironment variable. An example of installation using a custom target path would beINSTALL_FONT_ROOT_PATH=/custom/font/path ./install.bash.~/.fontsdirectory for installation on *nix.install.sh Ubuntu). This filter was was case-sensitive and only filtered based on the font file name. This new script allows for any number of filters (likeinstall.bash ubuntu firamono [etc]) and is no longer case-sensitive. While this script also performs the filter search via the file name (for example passingfuramonowill continue to match the font fileFuraMono-Bold Powerline.otf) it additionally performs the filter search via the directory the font is in (for example passingfiramonowill not match the file name but it will match the same file because of its path ofFiraMono/FuraMono-Bold Powerline.otf)./usr/share/fontsthey can simply callINSTALL_FONT_ROOT_PATH=/usr/share/fonts ./install.bashwithout having to run the whole script withsudoand the script will automatically utilize sudo to copy the files.<root>/<type>/<family>/<file>.<ext>. An example of a resolved target path is~/.fonts/opentype/FiraMono/FuraMono-Bold-Powerline.otf. Below is a short description of the path placeholders used prior:root: the requested or automatically determined installation root (such as~/.fonts).type: the font file type (extension) name (such asopentype,truetype, andpcf).family: the font family name as determined by the folder structure (such asUbuntu, orFiraMono, etc).file: the font file name (such asFuraMono-Bold-Powerline, etc).ext: the font file extension (such asotf, etc).There may be a few other changes, but the above list covers the major, important distinctions this script has from the existing one.
Note: this is still a work in progress (for example,
fc-cacheisn't yet called and it has not been compatibility-tested with Darwin); do not merge as-is (I will update to remedy these issues if interest exists for this script's inclusion in the project).