chiark / gitweb /
dot/profile: Move Cargo debris into the XDG cache directory.
[profile] / dot / profile
index 925127d447934c8c6286983fb251cf1bb79f3846..4df991ec12a40b4ef005a0e99f718fdeddf03d95 100644 (file)
@@ -133,8 +133,11 @@ unset ed emacs_startup_args
 ###--------------------------------------------------------------------------
 ### Locale configuration.
 
-case ${DISPLAY+t} in
-  t)
+case ${LC_MDWSSHLANG+t},${DISPLAY+t} in
+  t,*)
+    LANG=$LC_MDWSSHLANG
+    ;;
+  ,t)
     __mdw_setconf LANG x-ctype POSIX
     ;;
   *)
@@ -142,7 +145,7 @@ case ${DISPLAY+t} in
     case "$TERM,$(tty)" in
       linux,/dev/tty*)
        if { vt-is-UTF8 || kbd_mode | grep UTF-8; } >/dev/null 2>&1; then
-         ctype=.utf8
+         ctype=.UTF-8
        else
          ctype=
        fi
@@ -156,6 +159,10 @@ export LANG
 
 LC_COLLATE=POSIX; export LC_COLLATE
 
+case ${LANG+t} in
+  t) LC_MDWSSHLANG=$LANG; export LC_MDWSSHLANG ;;
+esac
+
 ###--------------------------------------------------------------------------
 ### Pagers.
 
@@ -169,8 +176,6 @@ export MDW_PAGER PAGER METAMAIL_PAGER
 unset pg
 
 ## Configure `less'.
-LESS="-iqgRh1j.3FSX"; export LESS
-LESSOPEN="|lesspipe.sh %s"; export LESSOPEN
 case ${LC_CTYPE-$LANG} in
   *utf8 | *utf-8 | *UTF8 | *UTF-8) LESSCHARSET=utf-8 ;;
   *) LESSCHARSET=latin1 ;;
@@ -201,13 +206,19 @@ case "${http_proxy-none},$http" in
   *,none) ;;
   none,*) http_proxy=http://$http/; export http_proxy ;;
 esac
+https=$(mdw-conf https-proxy none)
+case "${https_proxy-none},$https,${http_proxy-none}" in
+  *,none,none) ;;
+  none,none,*) https_proxy=$http_proxy; export https_proxy ;;
+  none,*,*) https_proxy=http://$https/; export ftp_proxy ;;
+esac
 ftp=$(mdw-conf ftp-proxy none)
 case "${ftp_proxy-none},$ftp,${http_proxy-none}" in
   *,none,none) ;;
   none,none,*) ftp_proxy=$http_proxy; export ftp_proxy ;;
   none,*,*) ftp_proxy=http://$ftp/; export ftp_proxy ;;
 esac
-unset http ftp
+unset http https ftp
 
 ## Ncurses programs should use the Unicode box-drawing characters because the
 ## alternative character set stuff isn't supported well.
@@ -223,7 +234,7 @@ if __mdw_programp distcc; then CCACHE_PREFIX=distcc; export CCACHE_PREFIX; fi
 ## graphical one.
 set -- elinks w3m lynx
 case ${DISPLAY+t} in
-  t) set -- chromium mdw-iceweasel mdw-chrome iceweasel firefox "$@" ;;
+  t) set -- mdw-iceweasel mdw-chrome iceweasel firefox "$@" ;;
 esac
 for b in "$@"; do
   if __mdw_programp $b; then BROWSER=$b; export BROWSER; break; fi
@@ -261,6 +272,9 @@ QT_STYLE_OVERRIDE=gtk2; export QT_STYLE_OVERRIDE
 GTK_IM_MODULE=xim; export GTK_IM_MODULE
 QT_IM_MODULE=xim; export QT_IM_MODULE
 
+## Rust Cargo things.
+CARGO_HOME=$HOME/.cache/cargo; export CARGO_HOME
+
 ## Configure `ps'.
 PS_PERSONALITY=gnu; export PS_PERSONALITY