dotm4ke or .m4ke
This is my new setup for managing dotfiles.
A lot of people like to just use stow and git for this, and I probably
would too if I didn't have to manually edit my configs to fit each of my
computers. Since I have to manually edit the configs it is a pain to
bring them to sync with each other since there are bunch of changes that
shouldn't be synchronized between the machines. This system is basically
a Makefile that takes a few m4 files, and generates the configs for the
desired computer and distro.
./tpl - Here reside templates for distro stuff and some global things
that should be applied for each host, such as changing the quote
characters for m4.
./hst - Here reside the host specific templates that will set the
appropriate settings for each of my machines.
./src - Here reside the templated config files and some raw files that
get copied as they are.
./obj - This is where the ready configs go so they can be stowed into
the machines. Also the setup script will go here.
This little project is licensed under CC0, see COPYING for more details.
Currently files and directories with spaces in their names are just
ignored since I haven't found a way to handle them with make.
Currently the usage is as follows:
`make <hostname>` generates configurations for <hostname>.
`make clean` cleans the target directory.
`make dist-clean` also remove the default host selection.
`make` generates configs for the default host or print help if one
After you've generated your configs you can cd to obj/ and stow them
from there or install them in some other way.
Everything should already exist on your machine. If something is missing
it's probably either GNU make or GNU m4, both are packaged for pretty
much much every distro in existence.
Package names are usually `make' and `m4' for GNU make and GNU m4
Best way to install the configurations is probably GNU stow which is
packaged as `stow' for most distributions out there.