'

sstow

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

So I was wrong about unstowing..

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

sstow, the simple stow replacement

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

GNU stow and friends

I've been using GNU stow, and lately xstow to manage package
installation on my myriad linux systems:

  • I like the idea of being able to find out what a package a file comes from simply by doing a ls -l on it.
  • I like only having to look in one place for libraries, and binaries, includes and man pages.
  • I like having a sane $PATH.
  • I like a packaging system to use the filesystem to store information about packages.
  • I like to be able to fix the system with ln when I mangle it.
  • I also don't have the guts to go to a full on djb style directory layout.

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:

  • It will be in bash.
  • It will not be guaranteed to be stow compatible.
  • It will support n:1 source to target mappings.

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