diff options
-rwxr-xr-x | scripts/oe-git-proxy-socks-command | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/oe-git-proxy-socks-command b/scripts/oe-git-proxy-socks-command index 90fa14e1ed..39e0acb798 100755 --- a/scripts/oe-git-proxy-socks-command +++ b/scripts/oe-git-proxy-socks-command | |||
@@ -1,2 +1,17 @@ | |||
1 | #! /bin/bash | 1 | #! /bin/bash |
2 | SCRIPTDIR=`dirname $0` | ||
3 | # Check oe-git-proxy-socks exists | ||
4 | PROXYSOCKS=`which oe-git-proxy-socks 2> /dev/null` | ||
5 | if [ -z "$PROXYSOCKS" -a -e "$SCRIPTDIR/oe-git-proxy-socks.c" ]; then | ||
6 | # If not try and build it | ||
7 | gcc $SCRIPTDIR/oe-git-proxy-socks.c -o $SCRIPTDIR/oe-git-proxy-socks | ||
8 | fi | ||
9 | PROXYSOCKS=`which oe-git-proxy-socks 2> /dev/null` | ||
10 | if [ ! -x "$PROXYSOCKS" ]; then | ||
11 | # If that fails, explain to the user | ||
12 | echo "Unable to find oe-git-proxy-socks. This is usually created with the command" | ||
13 | echo "'gcc scripts/oe-git-proxy-socks.c -o scripts/oe-git-proxy-socks' which we tried" | ||
14 | echo "but it doesn't seem to have worked. Please compile the binary manually." | ||
15 | exit 1 | ||
16 | fi | ||
2 | oe-git-proxy-socks -S $GIT_PROXY_HOST:$GIT_PROXY_PORT $@ | 17 | oe-git-proxy-socks -S $GIT_PROXY_HOST:$GIT_PROXY_PORT $@ |