Skip to content

Commit debc320

Browse files
bufferoverflowdscho
authored andcommitted
feat(git-update): get proxy from git http.proxy
Signed-off-by: Roger Meier <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e48133e commit debc320

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

git-extra/PKGBUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ sha256sums=('e6a17a669fe8282792b3d98a2c47718425364a0ca9a456bdbad4a69c57ec6978'
6060
'2dba0f5f8133b8e8d1da8291efec140cd516e385f04b33b95e4f97fc40f628b3'
6161
'f4e310c00721f8834949268167b0584b7c9323775a318574dbca960af10d7998'
6262
'89b4d784e1c07d67c11a35abc7094709c216372e2099b2eb7abbc6eb7c34861f'
63-
'33a49036a52442a9754240e67abeb9dc2f686e8e25e5f70d522d78a150085e0a')
63+
'31edcc287caf295e30c481fbcecc29220114eb07367da497eb509ba675c09e9c')
6464

6565
prepare() {
6666
test $startdir/$pkgname.install -nt $startdir/$pkgname.install.in &&

git-extra/git-update

+9-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
# when confirmation to do so is given.
66

77
git_update () {
8+
proxy=$(git config --get http.proxy)
9+
if test -n "$proxy"
10+
then
11+
export https_proxy="$proxy"
12+
echo "Using proxy server $https_proxy detected from git http.proxy" >&2
13+
fi
14+
815
yn=
916
while test $# -gt 0
1017
do
@@ -39,7 +46,7 @@ git_update () {
3946
return
4047
fi
4148

42-
echo "Update $latest is available"
49+
echo "Update $latest is available" >&2
4350
download=$(echo "$releases" |
4451
grep '"browser_download_url": "' |
4552
grep "$bit\-bit\.exe" |
@@ -55,7 +62,7 @@ git_update () {
5562
else
5663
warn=" (killing $other_bashes other Bash)"
5764
fi
58-
read -p "Download $filename and install$warn [N/y]? " yn
65+
read -p "Download $filename and install$warn [N/y]? " yn >&2
5966
case "$yn" in
6067
[Yy]*) ;;
6168
*) return 1;;

installer/install.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Name: consolefont; Description: Use a TrueType font in all console windows
103103
Filename: {app}\git-bash.exe; Parameters: --cd-to-home; Description: Launch Git Bash; Flags: nowait postinstall skipifsilent runasoriginaluser unchecked
104104
Filename: {app}\ReleaseNotes.html; Description: View Release Notes; Flags: shellexec skipifdoesntexist postinstall skipifsilent
105105
Filename: "schtasks"; \
106-
Description: Daily check for available update; \
106+
Description: Daily check for available update using git http.proxy if defined; \
107107
Parameters: "/Create /F /SC DAILY /TN ""Git for Windows Updater"" /TR ""'{app}\bin\git.exe' update"""; \
108108
Flags: runhidden postinstall
109109

0 commit comments

Comments
 (0)