]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
cri-common: Only use git proxy for git, http and https URLs
authorIan Campbell <ian.campbell@citrix.com>
Fri, 25 Apr 2014 15:15:20 +0000 (16:15 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 1 May 2014 15:59:41 +0000 (16:59 +0100)
For testing I had ap-fetch-version-old returning a file:// URL to a local repo.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
cri-common

index f472927b487ea6ef1e1682a887d9fda413d61111..d82312c54df7933f72f330e6436107c163af6374 100644 (file)
@@ -26,7 +26,12 @@ repo_tree_rev_fetch_git () {
        local remoteurl=$2
        local remotetag=$3
        local localtag=$4
-       local realurl="`getconfig GitCacheProxy`$remoteurl"
+       case $remoteurl in
+       git://*|http://*|https://*)
+               local realurl="`getconfig GitCacheProxy`$remoteurl" ;;
+       *)
+               local realurl="$remoteurl" ;;
+       esac
        if ! test -d $repos/$treename; then
                git clone --bare $realurl $repos/$treename >&2
        fi