This is my GNU stow lookalike. It behaves mostly like stow, except:
The script is pretty simple. Specify a source and a target directory, and it will traverse the source directory, and create symlinks from the target directory to the source directory. The idea behind this is being able to not have to store packages directly in /, /usr/, or wherever.
The script is build around a lookup table. It starts by traversing the source directory, and then takes actions based on what it finds in the target directory:
# File types: ... # dne - does not exist # mf - managed file ... rule mf dne link ...
This rule says that if the object in the source directory is a managed file, and there is nothing of the same name in the target directory, create a link.
Take a look inside the script for all of the rules.
Setup information is provided in the README file.
To download the script, use apull:
apull.sh mudshark.org org.mudshark.jack.proj.sstow
It turns out that I do need the ability to unstow things.
This feature wasn't too hard to cram in, although there is no simple inverse of the split rule, so we may leave empty dirs.
jack |
posted Wed Aug 30 23:34:38 2006 |
updated Sat Sep 9 00:43:36 2006 |
#
category:
projects/sstow
I put my nose to the grindstone and got sstow done (go there if you want to take a look at it). I think it's rather clever program for being 149 lines long.
Now let's see how well it does when I try and use it..
jack |
posted Wed Aug 30 22:12:04 2006 |
#
category:
projects/sstow
I've been using GNU stow,
and lately xstow to manage package
installation on my myriad linux systems:
Today I got fed up. GNU stow is nice, but it depends on perl. xstow is nice,
because it can be made into a static binary, but it seems a wee bit bloatish. I
can't seem to get either one to support multiple stow directories for a single
target directory, so directory splitting doesn't work properly. So, I'm going
to write my own:
jack |
posted Thu Aug 17 16:59:56 2006 |
updated Thu Aug 17 17:11:16 2006 |
#
category:
projects/sstow
A weblog by Jack Cummings