4

TLDR: Can I pre-define a stow folder other than /usr/local with GNU Stow?

I do not have admin privileges on the machine I use for work, and I was told that I could use GNU Stow to manage my installations. The tool looks great, but everywhere in the documentation I read that stow uses /usr/local as the installation directory where it builds the symlink farm.

Unfortunately this folder was already populated by root, and I do not have write privileges on anything under /usr/local.

There is a flag -t that I can use in the command line to specify the target directory, but since I will always be using the same (I want my installations to consistently be under the same target directory), I was wondering if there is a way to use a default path of my choice.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Amelio Vazquez-Reina
  • 40,169
  • 77
  • 197
  • 294
  • 1
    Did you read the INSTALL file? [What have you tried?](http://whathaveyoutried.com) I'd never even heard of GNU Stow before, but I found the various prefix options in less than 5 mins. – depquid Apr 13 '13 at 20:59
  • 1
    Thanks @depquid, the only thing I found is the command line flag -`-t` that I can pass to stow to specify the target directory. I am looking for something that is a bit more persistent (perhaps an environment variable). From what I read, the `STOW_DIR` environment variable specifies the `stow directory`and not the target directory. – Amelio Vazquez-Reina Apr 13 '13 at 23:07

1 Answers1

5

You can configure a default target via the .stowrc file; please see this section of the manual. If there is a compelling reason for needing to also set the default target directory via an environment variable, I can implement that for the next release too.

Adam Spiers
  • 892
  • 7
  • 14
  • 1
    It would actually be really nice to be able to use environment variables within the `.stowrc`. For example, I like to put my stow files in my home directory so it looks something like `--dir=/my/home/stow`. It would be nice to share this file between computers using something like `--dir=$HOME/stow`. – Ben Sidhom Mar 09 '14 at 05:40
  • 1
    Good idea; feel free to [submit a bug](https://savannah.gnu.org/bugs/?func=additem&group=stow). – Adam Spiers Mar 10 '14 at 11:13