Re: [dev] Linking a directory tree of configuration files

2017-08-31 Thread Truls Becken
On 2017-08-31 09:19, Thomas Levine wrote:
> it would be acceptable to have something like cp -R that differed
> only in that it made hard links instead of copies

This sentence stood out to me because cp already does that with
the -l switch.



Re: [dev] Linking a directory tree of configuration files

2017-08-31 Thread fao_

On 2017-08-31 8:19 am, Thomas Levine wrote:

Having trouble installing rcm on some computers, I came up with the
following alternative a couple weeks ago. I have been pleased.
https://thomaslevine.com/scm/lntree/
https://thomaslevine.com/scm/lntree/uv/lntree-0.1.tar.gz

Here is an example of where I have used it to compose configurations.
https://thomaslevine.com/scm/os/artifact?ln=17..25&name=fb261310832d4eb6

Does something else like this exist? I could do without some of the
features; for example, it would be acceptable to have something like
cp -R that differed only in that it made hard links instead of copies.



GNU stow? :D

I jest.

--
- fao_
PGP fingerprint: 739B 6C5C 3DE1 33FA
"Too enough is always not much!"



[dev] Linking a directory tree of configuration files

2017-08-31 Thread Thomas Levine
Having trouble installing rcm on some computers, I came up with the
following alternative a couple weeks ago. I have been pleased.
https://thomaslevine.com/scm/lntree/
https://thomaslevine.com/scm/lntree/uv/lntree-0.1.tar.gz

Here is an example of where I have used it to compose configurations.
https://thomaslevine.com/scm/os/artifact?ln=17..25&name=fb261310832d4eb6

Does something else like this exist? I could do without some of the
features; for example, it would be acceptable to have something like
cp -R that differed only in that it made hard links instead of copies.

Also, while I do like how this is working, I suspect that it could be
resolved more cleanly by designing the filesystem better. Consider,
for example, the following rules.

* All configuration files are stored in only a couple places so that
  they are easy to find and commit to version control.
* There are separate directories for private and public files so that
  they can easily be put in separate version control repositories.
* Directories containing configuration files do not contain any garbage,
  such as caches, examples, nor big files.

This way, you could put the configuration locations directly into
version control, without creating so many links. I am not pleased with
these rules, but they should give you an idea of what I am thinking.