Linux Installation Script
Relevant source files
The following files were used as context for generating this wiki page:
The Linux Installation Script is a utility designed to facilitate the deployment of the AFIO font (a custom Iosevka Nerd Font) onto Linux systems. This script serves as the final step in the local build pipeline, moving the generated .ttf files from the build output directory to the system's global font directory.
The script targets a specific directory structure within /usr/share/fonts/ to ensure the font is recognized system-wide. It is primarily intended for users who choose to build the font locally using the provided Docker-based build system or for those performing a manual installation from release assets.
Sources: install_linux.sh:1-6, README.md:57-61
Workflow and Execution
The installation process follows a linear execution path that requires superuser privileges to modify system directories. It assumes that the fonts have already been generated and are located in the _output directory.
Execution Logic
The script performs the following operations:
- Strict Error Handling: Utilizes
set -eto ensure the script terminates immediately if any command fails. - Directory Creation: Creates the target directory
/usr/share/fonts/truetype/afiousingsudo mkdir -p. - File Deployment: Copies all TrueType Font (
.ttf) files from the local_output/folder to the system directory.
The diagram shows the sequential flow of the Linux installation script from initiation to final font deployment.
Sources: install_linux.sh:3-6
Integration with Build System
The installation script is the consumer of the artifacts produced by the build pipeline. The build process, defined in build.sh, utilizes Docker to generate Iosevka fonts and then uses src/nerd-patcher.py to inject Nerd Font glyphs.
| Component | Role in Installation | Source Reference |
|---|---|---|
build.sh | Generates the _output directory and populates it with fonts. | build.sh:11-13 |
src/nerd-patcher.py | Patches the raw Iosevka files and places the final .ttf files in /output. | src/nerd-patcher.py:12-14 |
_output/ | The source directory for the installation script. | install_linux.sh:6 |
/usr/share/fonts/truetype/afio | The destination path for Linux system-wide installation. | install_linux.sh:5 |
Data Flow Overview
This diagram illustrates how font files transition from the Dockerized build environment to the final system location on a Linux machine.
Sources: build.sh:40-42, install_linux.sh:6
Font Configuration Requirements
The script installs specific font weights and variants defined in the project's build plan. Based on the private-build-plans.toml and the README, the installation typically includes:
- Light: CSS Weight 300
- Regular: CSS Weight 400
- Medium: CSS Weight 500
- Bold: CSS Weight 700
The install_linux.sh script uses a wildcard (*.ttf) to ensure all these generated weights are moved to the system directory simultaneously.
Sources: private-build-plans.toml:44-63, README.md:37-41, install_linux.sh:6
Summary
The install_linux.sh script provides a straightforward, automated method for installing AFIO fonts on Linux. By targeting the standard /usr/share/fonts/truetype/ path, it ensures that the custom Iosevka Nerd Font is available to all applications and users on the system after a local build or manual download.