Skip to content

Commit

Permalink
[ffmpeg] Deal with case-sensitive env vars
Browse files Browse the repository at this point in the history
When behind a corporate proxy, one often needs to specify `HTTP_PROXY` and `HTTPS_PROXY` for some command line tools to work properly. However, `pacman` seems to rely on the lowercase equivalent environment variables. In a Windows command prompt environment, it is not possible to set both since Windows environment variables are not case-sensitive. As a workaround, this build script checks for the existence of HTTP_PROXY and HTTPS_PROXY. If they exist, they are exported as lowercase variables.
  • Loading branch information
ShinNoNoir authored Oct 2, 2017
1 parent 0ecd97a commit 973b0e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ports/ffmpeg/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/usr/bin/bash
set -e
export PATH=/usr/bin:$PATH
# Export HTTP(S)_PROXY as http(s)_proxy:
if [ "$HTTP_PROXY" ]; then
export http_proxy=$HTTP_PROXY
fi
if [ "$HTTPS_PROXY" ]; then
export https_proxy=$HTTPS_PROXY
fi
pacman -Sy --noconfirm --needed diffutils make

PATH_TO_BUILD_DIR="`cygpath "$1"`"
Expand Down

0 comments on commit 973b0e5

Please sign in to comment.