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
6 if [ -e "$NIX_ATTRS_SH_FILE" ]; then .
"$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh
]; then . .attrs.sh
; fi
9 echo "exporting $url (rev $rev) into $out"
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"}