From 21c3eaf500504cbd4b1807ecc1dd6ed9603caf38 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Wed, 11 Mar 2015 08:14:46 -0500 Subject: [PATCH] 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 --- bin/install_user | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/bin/install_user b/bin/install_user index f4f96be1..234e5d35 100755 --- a/bin/install_user +++ b/bin/install_user @@ -8,14 +8,9 @@ use Cwd 'abs_path'; $trick_bin = dirname(abs_path($0)) ; $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 " ; -if ( $shell =~ /csh/ ) { - print ".cshrc\n" ; - print "setenv PATH \"\${PATH}:$trick_home/bin\"\n" ; -} else { - print ".bashrc\n" ; - print "export PATH=\"\${PATH}:$trick_home/bin\"\n" ; -} +print "if you use [t]csh add this line to your .cshrc\n" ; +print "setenv PATH \"\${PATH}:$trick_home/bin\"\n" ;