support tcsh

This commit is contained in:
neil 2016-05-09 22:28:45 +08:00
parent 7939b419f7
commit acafa585f4

14
acme.sh
View File

@ -1911,6 +1911,14 @@ _installalias() {
_setopt "$_cshfile" "alias $PROJECT_ENTRY" " " "\"$LE_WORKING_DIR/$PROJECT_ENTRY\"" _setopt "$_cshfile" "alias $PROJECT_ENTRY" " " "\"$LE_WORKING_DIR/$PROJECT_ENTRY\""
_setopt "$_csh_profile" "source \"$_cshfile\"" _setopt "$_csh_profile" "source \"$_cshfile\""
fi fi
#for tcsh
_tcsh_profile="$HOME/.tcshrc"
if [ -f "$_tcsh_profile" ] ; then
_setopt "$_cshfile" "setenv LE_WORKING_DIR" " " "\"$LE_WORKING_DIR\""
_setopt "$_cshfile" "alias $PROJECT_ENTRY" " " "\"$LE_WORKING_DIR/$PROJECT_ENTRY\""
_setopt "$_tcsh_profile" "source \"$_cshfile\""
fi
} }
@ -2019,6 +2027,12 @@ uninstall() {
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_csh_profile" echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_csh_profile"
fi fi
_tcsh_profile="$HOME/.tcshrc"
if [ -f "$_tcsh_profile" ] ; then
text="$(cat $_tcsh_profile)"
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_tcsh_profile"
fi
rm -f $LE_WORKING_DIR/$PROJECT_ENTRY rm -f $LE_WORKING_DIR/$PROJECT_ENTRY
_info "The keys and certs are in $LE_WORKING_DIR, you can remove them by yourself." _info "The keys and certs are in $LE_WORKING_DIR, you can remove them by yourself."