mirror of
https://github.com/nasa/trick.git
synced 2024-12-19 21:27:54 +00:00
Fixed shell detection logic.
Fiexed the shell detection logic by not trying to. Changed the install_user script to just print the add TRICK_HOME to the PATH for both types of shells. Fixes #9
This commit is contained in:
parent
aecc0504fa
commit
21c3eaf500
@ -8,14 +8,9 @@ use Cwd 'abs_path';
|
|||||||
$trick_bin = dirname(abs_path($0)) ;
|
$trick_bin = dirname(abs_path($0)) ;
|
||||||
$trick_home = dirname($trick_bin) ;
|
$trick_home = dirname($trick_bin) ;
|
||||||
|
|
||||||
$shell = (getpwent())[8] ;
|
print "if you use bash add this line to your .bashrc\n" ;
|
||||||
|
print "export PATH=\"\${PATH}:$trick_home/bin\"\n\n" ;
|
||||||
|
|
||||||
print "Add this line to the end of your " ;
|
print "if you use [t]csh add this line to your .cshrc\n" ;
|
||||||
if ( $shell =~ /csh/ ) {
|
print "setenv PATH \"\${PATH}:$trick_home/bin\"\n" ;
|
||||||
print ".cshrc\n" ;
|
|
||||||
print "setenv PATH \"\${PATH}:$trick_home/bin\"\n" ;
|
|
||||||
} else {
|
|
||||||
print ".bashrc\n" ;
|
|
||||||
print "export PATH=\"\${PATH}:$trick_home/bin\"\n" ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user