Browse Source

support tcsh

master
neil 9 years ago
parent
commit
acafa585f4
  1. 14
      acme.sh

14
acme.sh

@ -1911,6 +1911,14 @@ _installalias() {
_setopt "$_cshfile" "alias $PROJECT_ENTRY" " " "\"$LE_WORKING_DIR/$PROJECT_ENTRY\""
_setopt "$_csh_profile" "source \"$_cshfile\""
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"
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
_info "The keys and certs are in $LE_WORKING_DIR, you can remove them by yourself."

Loading…
Cancel
Save