ソースを参照

Add reuse proxy (#34)

Bohan Yang 4 年 前
コミット
36b0ca839b
2 ファイル変更4 行追加2 行削除
  1. 1 0
      README.md
  2. 3 2
      debi.sh

+ 1 - 0
README.md

@@ -110,6 +110,7 @@ Otherwise, you can run this command to revert all changes made by the script:
  * `--daily-d-i` Use latest daily build of d-i (Debian Installer) for the unreleased version: 12 (bookworm), sid (unstable)
  * `--mirror-protocol http` or `https` or `ftp`
  * `--https` alias to `--mirror-protocol https`
+ * `--reuse-proxy` Reuse the value of `http(s)_proxy` environment variable as the mirror proxy
  * `--proxy, --mirror-proxy` Set an HTTP proxy for APT and downloads
  * `--mirror-host deb.debian.org`
  * `--mirror-directory /debian`

+ 3 - 2
debi.sh

@@ -306,6 +306,9 @@ while [ $# -gt 0 ]; do
             mirror_proxy=$2
             shift
             ;;
+        --reuse-proxy)
+            set_mirror_proxy
+            ;;
         --security-repository)
             security_repository=$2
             shift
@@ -531,8 +534,6 @@ EOF
     echo 'd-i network-console/start select Continue' | $save_preseed
 }
 
-set_mirror_proxy
-
 $save_preseed << EOF
 
 # Mirror settings