fetch-component-libs - fetch, check and refresh the third-party component libraries that the test designs of packpay use
fetch-component-libs
[--dir DIR] [--update |
--refresh]
fetch-component-libs {-h|--help}
The test designs of this project name the symbols of some of their parts in third-party libraries that are not shipped with it, their licences being their own: the Seeed Studio XIAO symbols and two Adafruit Eagle designs, the parts of TestSchemes/PoorManAltimeter. The sources file of that design, altimeter-sources.json, names them relative to the component library directory (see ppresolve_components(1)), and the documents’ commands on the altimeter, the figure of its regenerated schematic and the tests that use them need them. fetch-component-libs puts them there, with the layout the sources file expects:
Seeed_Studio_XIAO_Series.kicad_sym
Adafruit-BMP280-Breakout-PCB/Adafruit BMP280.sch
MicroSD-breakout-board/microsd.sch
The two Adafruit libraries are shallow git clones of their repositories; the Seeed file is the one in the folder Seeed Studio XIAO Series Library of the repository OPL_Kicad_Library, fetched with a sparse checkout. It needs git and a network.
With no option it fetches what is missing and leaves what is there alone.
--update
Also check what is there against its upstream, and bring it up to date only where it is behind. A library that is already current is reported as up to date and is not touched: for a clone the checked thing is the commit, for the Seeed file its content.
--refresh
Discard what is there and fetch everything again, whether or not it is current.
--dir DIR
The directory to use; it is created if it does not exist. Without it: the first directory of PACKPAY_COMPONENT_LIBS if that is set, otherwise the directory that was given to ./configure with --with-component-libs=DIR (the generated script has it built in), otherwise $XDG_DATA_HOME/packpay/component_libs.
-h, --help
Print the usage and the order of use, and exit.
./bootstrap
./configure [--with-component-libs=DIR]
./fetch-component-libs --update
./configure generates this script from fetch-component-libs.in, with the directory it was given as the default, and checks whether the three libraries are there. The tools find the directory through PACKPAY_COMPONENT_LIBS, which make sets from the same value; the environment variable overrides it.
PACKPAY_COMPONENT_LIBS
The component library directories, separated as the directories of a PATH are. The first one is where this script puts the libraries.
PACKPAY_FETCH_BMP280_URL,
PACKPAY_FETCH_MICROSD_URL,
PACKPAY_FETCH_SEEED_URL
Another place to fetch a library from, instead of its repository on GitHub: a mirror behind a firewall, or a local repository (the tests of this script use them).
0 on success; 1 if git is missing, a fetch fails or the Seeed file is no longer in its folder; 2 for a usage error.
Fetch what is missing, into the directory that configure was given:
$ fetch-component-libs --update
Fetch into a directory of one’s own:
$ fetch-component-libs --dir $HOME/component_libs
ppresolve_components(1), ppextract_sources(1)
Péter Felecan <pfelecan@gmail.com>, with development assistance from Claude (Anthropic).
Copyright © 2026 Péter Felecan. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.