1# tested so far with:
2# - no revision specified and remote has a HEAD which is used
3# - revision specified and remote has a HEAD
4# - revision specified and remote without HEAD
5#
6if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
7source $stdenv/setup
8
9echo "exporting $url (rev $rev) into $out"
10
11$SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \
12 ${leaveDotGit:+--leave-dotGit} \
13 ${fetchLFS:+--fetch-lfs} \
14 ${deepClone:+--deepClone} \
15 ${fetchSubmodules:+--fetch-submodules} \
16 ${sparseCheckout:+--sparse-checkout "$sparseCheckout"} \
17 ${nonConeMode:+--non-cone-mode} \
18 ${branchName:+--branch-name "$branchName"}
19
20runHook postFetch