]> granicus.if.org Git - strace/commitdiff
ci: clone musl from the local server
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 13 Mar 2018 15:12:14 +0000 (15:12 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 13 Mar 2018 15:12:14 +0000 (15:12 +0000)
Assume that strace project on the local server contains an appropriate
musl repository, use this repository instead of hardcoded github
location.

* ci/install-dependencies.sh (clone_repo): Use local server by default.
(musl-gcc): Un-hardcode the location of musl repository.

ci/install-dependencies.sh

index f41c928795ffdbd7deca31a5351f5d97cd9cc419..e524f00fee71dba7be5d2eb02110311f886a0bd5 100755 (executable)
@@ -25,6 +25,16 @@ clone_repo()
                apt_get_install git ca-certificates
                git_installed=1
        }
+
+       case "$src" in
+               *://*)  ;;
+               *)      local url path
+                       url="$(git config remote.origin.url)"
+                       path="${url#*://*/}"
+                       src="${url%$path}$src"
+                       ;;
+       esac
+
        git clone --depth=1 "$src" "$dst"
 }
 
@@ -53,7 +63,7 @@ case "$CC" in
                apt_get_install $common_packages "$CC"
                ;;
        musl-gcc)
-               clone_repo https://github.com/strace/musl musl
+               clone_repo strace/musl musl
                apt_get_install $common_packages
                cd musl
                        CC=gcc