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