В Tue, 21 Oct 2014 19:21:38 +0200 (CEST) Yamaban <foerster@lisas.de> пишет:
On Tue, 21 Oct 2014 19:05, Claudio Freire wrote:
On Tue, Oct 21, 2014 at 1:15 PM, Erwin Waterlander wrote:
Andreas Schwab schreef op 2014-10-21 14:13:
Erwin Waterlander <waterlan@xs4all.nl> writes:
Andreas Schwab schreef op 2014-10-21 12:55:
Erwin Waterlander <waterlan@xs4all.nl> writes: > Andreas Schwab schreef op 2014-10-21 10:38: >> Erwin Waterlander <waterlan@xs4all.nl> writes: >>>> >>>> $HOME/bin is not guaranteed to exist.
~/bin should be created at first user login due to /etc/skel
>>> It will be automatically created. >> >> It's not the right place for temporary files. > > I know, but I want to keep it there for backward compatibility.
Which compatibility? This is an implementation detail of wcd.
For all those people who manually created the function. Those are a lot over the past 18 years, and I don't want to bother them.
They will continue to use the function they defined on their own.
The bin sub-folder is default on Unix. That is set in the binary and is also documented. I can use the -G option to change the location, but I don't want to do that in the default function. When the option -G is used WCDHOME has no influence on the location of the go-script anymore. This may surprise users. I leave the use of -G to personal configurations. Because it is a shell script, and personal scripts are put typically in ~/bin, I was thinking 18 years ago to put this one there too. Perhaps wrong, but it is not a big deal. If it is a problem for a user he/she can always change the location.
Well, TBH, I don't think putting an executable script in /tmp is a good idea either. I'm pretty sure the security guys will complain if done like that. I prefer something in home than in /tmp. In that sense, while ~/bin isn't the right place (I'd rather go for ~/tmp if it was standard), it's the safest choice ATM. The function only has to be really sure it's not clobbering any existing script there, and that folder permissions are not too permissive.
Hmm, how about a folder "wcd" under "~/.local"?
$XDG_RUNTIME_DIR?
.local/ is in /etc/skel, and is conform to the freedesktop standards, OTOH, maybe the dir ~/.config/ is better, but you have to create it with mode 0700 if it isn't there already (not in skel).
- Yamaban
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org