Skip to content

Commit

Permalink
Merge pull request NixOS#599 from tomberek/19.03_fixes
Browse files Browse the repository at this point in the history
submodule fix
  • Loading branch information
edolstra committed Oct 3, 2018
2 parents 0bc548e + 8bffbb7 commit e0f204f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/script/nix-prefetch-git
Expand Up @@ -139,15 +139,8 @@ init_submodules(){
git submodule init

# list submodule directories and their hashes
git submodule status |
while read l; do
# checkout each submodule
local hash=$(echo $l | sed 's,^-\([0-9a-f]*\) \(.*\)$,\1,');
local dir=$(echo $l | sed 's,^-\([0-9a-f]*\) \(.*\)$,\2,');
local url=$(sed -n "\,$dir, { :loop; n; s,^.*url = ,,; T loop; p; q }" .git/config);

clone "$dir" "$url" "$hash" "";
done;
git submodule update
git submodule status
}

clone(){
Expand Down

0 comments on commit e0f204f

Please sign in to comment.