From b8a0956443606b251a0cfe04b313183f986a5d31 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 26 May 2015 16:01:37 +0200 Subject: [PATCH] reproduce.tt: Add option to fetch but not build --- src/root/reproduce.tt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/root/reproduce.tt b/src/root/reproduce.tt index f24d2fe6..3d499c89 100644 --- a/src/root/reproduce.tt +++ b/src/root/reproduce.tt @@ -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.