|
|
|
#+TITLE: Manafiles
|
|
|
|
#+AUTHOR: Riyyi
|
|
|
|
#+LANGUAGE: en
|
|
|
|
#+OPTIONS: toc:nil
|
|
|
|
|
|
|
|
Config file and package tracking utility.
|
|
|
|
|
|
|
|
- Manage dotfiles and system config files.
|
|
|
|
- Selectively command and uncomment depending on machine configuration.
|
|
|
|
- Store a list of all installed packages.
|
|
|
|
- Install packages from a stored list.
|
|
|
|
|
|
|
|
** Build instructions
|
|
|
|
|
|
|
|
#+BEGIN_SRC shell-script
|
|
|
|
$ mkdir build
|
|
|
|
$ cd build
|
|
|
|
$ cmake ..
|
|
|
|
$ make
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
** Installation
|
|
|
|
|
|
|
|
#+BEGIN_SRC shell-script
|
|
|
|
$ sudo make install
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
** Usage
|
|
|
|
|
|
|
|
*** Selectively comment and uncomment
|
|
|
|
|
|
|
|
Config files can be pushed from the working directory to the system like so:
|
|
|
|
|
|
|
|
#+BEGIN_SRC shell-script
|
|
|
|
$ manafiles -Fs
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
When pushing files to the system, manafiles recognizes special blocks and comments
|
|
|
|
or uncomments them depending on the machine's configuration. Such a block looks
|
|
|
|
like this:
|
|
|
|
|
|
|
|
#+BEGIN_SRC shell-script
|
|
|
|
# >>> distro=arch hostname=arch-desktop user=anon
|
|
|
|
export PATH="$PATH:$HOME/.local/bin"
|
|
|
|
# <<<
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
This block uses all of the supported configurations, ~distro~, ~hostname~ and
|
|
|
|
~user~. These can be used in any combination and order.
|
|
|
|
|
|
|
|
If *all* of the given configurations match, manafiles will make sure that the
|
|
|
|
contents of the block are uncommented. If *any* of them do *not* match, then
|
|
|
|
manafiles will make sure that the contents of the block are commented.
|
|
|
|
|
|
|
|
*** COMMENT System config files
|
|
|
|
*** COMMENT Exclude paths
|