chiark / gitweb /
dot/profile: Support (and export) `$https_proxy' variable.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jun 2018 00:22:10 +0000 (01:22 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jun 2018 00:22:53 +0000 (01:22 +0100)
dot/profile

index 9cd5a3791abc649804c6b3f49fa0c6bf15f8c817..acf616758816925c17add724316ff8c5e9c8b04f 100644 (file)
@@ -208,13 +208,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.