Re: Include in PATH

2013-10-14 Thread Beco
On 13 October 2013 00:25, Craig Small csm...@debian.org wrote:

 You have to decide at what point you want to make the decision between
 global or user scores. At install time is a bad point. The two better
 options are
  configure time
  run time
[cut]

Hi Craig,

Good point. I'll move the decision point to ./configure.

[cut]
Would it be polite to do something like:
echo PATH=~./gamedir/:$PATH  ~/.profile
 Uh no, you never do that. Have a sane default and let the user know how
 to set it. PATH is where the binaries are, not score/config/data files.

I'm talking about binaries in this email.  But since you already
answered to put the binary always in /usr/games/, so I don't need  to
change PATH anymore.

Thanks a lot.

Beco.





 --
 Craig Small VK2XLZ   http://enc.com.au/  csmall at : enc.com.au
 Debian GNU/Linux http://www.debian.org/  csmall at : debian.org
 GPG fingerprint: 5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5


 --
 To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/20131013032533.gb5...@enc.com.au




-- 
Dr Beco
A.I. researcher

Sometimes the heart sees what is invisible to the eye. (H. Jackson Brown Jr.)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caluyw2z8abtyuoaosriw25rfp2nr6megbpoh0jc6wqht6x2...@mail.gmail.com



Include in PATH

2013-10-12 Thread Beco
Dear mentors,

I'm creating a makefile with two installation rules.

One, the global installation, program with SGID and score in /var/games/
like some other games do.

The second one would install the program and scores under ~/.gamedir/

Global installation allow me to call the game directly because /usr/games
is in $PATH.

Now, for the second installation process, what would be the best way to
include the game on PATH?

Would it be polite to do something like:

echo PATH=~./gamedir/:$PATH  ~/.profile

I want this second rule to install without the root password, so I'm
limited to so many linux commands.

Is this the way to go? And with .profile script? Or .bashrc? Or still
another one less usual but functional for this task? (


Thanks,
Beco.




-- 
Dr Beco
A.I. researcher

Sometimes the heart sees what is invisible to the eye. (H. Jackson Brown
Jr.)


Re: Include in PATH

2013-10-12 Thread Craig Small
On Sat, Oct 12, 2013 at 09:51:52PM -0300, Beco wrote:
I'm creating a makefile with two installation rules.
One, the global installation, program with SGID and score in /var/games/
like some other games do.
The second one would install the program and scores under ~/.gamedir/A 
Global installation allow me to call the game directly because /usr/games
is in $PATH.
You have to decide at what point you want to make the decision between
global or user scores. At install time is a bad point. The two better
options are
 configure time
 run time
For configure time, use a ./configure option, say --enable-globalscores
compile with this on and it looks for scores in /var/games and the only
way to not use that is recompile. This is not as a big a limitation as
you first think.

The second way is at run time. You can make it an option or environment
variable or some configuration item. If you have to configure stuff in
the program already put it with that.

You could just try the global directory and if it fails use the local
directory.

Now, for the second installation process, what would be the best way to
include the game on PATH?
The game *binary* should be in the PATH, don't mess with the path to
find it. The game *score file* should be worked out by the binary. A
config item, ./configure option or environment variable.
Wether or not it is SGID, it is installed in the same spot.
As a package distributor you can ask the user if they want SGID, set is
a low priority and default to NO.

Would it be polite to do something like:
echo PATH=~./gamedir/:$PATH  ~/.profile
Uh no, you never do that. Have a sane default and let the user know how
to set it. PATH is where the binaries are, not score/config/data files.

-- 
Craig Small VK2XLZ   http://enc.com.au/  csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/  csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131013032533.gb5...@enc.com.au