summaryrefslogtreecommitdiff
path: root/pkgs/build-support/fetchgit/builder.sh
blob: 393d0a57d16379ee47ab7b4bd32e1fda126a6caf (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# tested so far with:
# - no revision specified and remote has a HEAD which is used
# - revision specified and remote has a HEAD
# - revision specified and remote without HEAD
#

echo "exporting $url (rev $rev) into $out"

runHook preFetch

$SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" --name "$name" \
  ${leaveDotGit:+--leave-dotGit} \
  ${fetchLFS:+--fetch-lfs} \
  ${deepClone:+--deepClone} \
  ${fetchSubmodules:+--fetch-submodules} \
  ${fetchTags:+--fetch-tags} \
  ${sparseCheckout:+--sparse-checkout "$sparseCheckout"} \
  ${nonConeMode:+--non-cone-mode} \
  ${branchName:+--branch-name "$branchName"} \
  ${rootDir:+--root-dir "$rootDir"}

runHook postFetch