reproduce.tt: Add option to fetch but not build

This commit is contained in:
Eelco Dolstra 2015-05-26 16:01:37 +02:00
parent 91ecee0e5d
commit b8a0956443

View file

@ -15,6 +15,7 @@ info() {
# Process the command line.
fetchOnly=
while [ $# -gt 0 ]; do
arg="$1"
shift
@ -43,6 +44,9 @@ Flags:
to perform the build. See the description of the --run-env flag
in the nix-build(1) manpage for more details.
--fetch
Fetch the inputs and then exit.
Any additional flags are passed to nix-build. See the nix-build(1)
manpage for details.
EOF
@ -54,6 +58,8 @@ EOF
exit 1
fi
shift
elif [ "$arg" = --fetch ]; then
fetchOnly=1
else
extraArgs+=("$arg")
fi
@ -166,6 +172,8 @@ fi
[%+ END %]
if [ -n "$fetchOnly" ]; then exit 0; fi
# Run nix-build.