mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
Merge pull request #1482 from wkennington/master.git
nix-prefetch-git: Convert relative submodule URLS to absolute URLS
This commit is contained in:
commit
abea1d13e2
|
@ -148,6 +148,12 @@ init_submodules(){
|
|||
git config -f .gitmodules --get-regexp submodule\.[^.]*\.path |
|
||||
sed -n "s,^\(.*\)\.path $dir\$,\\1,p")
|
||||
local url=$(git config -f .gitmodules --get ${name}.url);
|
||||
|
||||
# Get Absolute URL if we have a relative URL
|
||||
if ! echo "$url" | grep '^[a-zA-Z]\+://' >/dev/null 2>&1; then
|
||||
url="$(git config --get remote.origin.url)/$url"
|
||||
fi
|
||||
|
||||
clone "$dir" "$url" "$hash" "";
|
||||
done;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue