From 6626371d87f125490154c06a0a5fcb3bd5cf9c94 Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 8 May 2016 00:44:03 +0800 Subject: [PATCH] minor. create the csh only when necessary. --- acme.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/acme.sh b/acme.sh index cc4ae546..667ce587 100755 --- a/acme.sh +++ b/acme.sh @@ -1905,11 +1905,10 @@ _installalias() { #for csh _cshfile="$LE_WORKING_DIR/$PROJECT_ENTRY.csh" - _setopt "$_cshfile" "setenv LE_WORKING_DIR" " " "\"$LE_WORKING_DIR\"" - _setopt "$_cshfile" "alias $PROJECT_ENTRY" " " "\"$LE_WORKING_DIR/$PROJECT_ENTRY\"" - _csh_profile="$HOME/.cshrc" if [ -f "$_csh_profile" ] ; then + _setopt "$_cshfile" "setenv LE_WORKING_DIR" " " "\"$LE_WORKING_DIR\"" + _setopt "$_cshfile" "alias $PROJECT_ENTRY" " " "\"$LE_WORKING_DIR/$PROJECT_ENTRY\"" _setopt "$_csh_profile" "source \"$_cshfile\"" fi