[PATCH 4/5] bootstrap: add support to stdin

Lorenzo Cappelletti lorenzo.cappelletti at gmail.com
Fri Apr 25 15:07:52 CEST 2014


Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti at gmail.com>
---
 mr | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mr b/mr
index be2bac6..d59dc39 100755
--- a/mr
+++ b/mr
@@ -1715,6 +1715,10 @@ sub bootstrap {
 			if $downloader[0] eq 'curl' && $status >> 8 == 60;
 		die "mr bootstrap: download of $src failed\n" if $status != 0;
 	}
+	elsif ($src eq '-') {
+		# Config file is read from stdin.
+		copy(\*STDIN, $tmpconfig) || die "stdin: $!";
+	}
 	else {
 		# Config file is local.
 		die "mr bootstrap: cannot read file '$src'"
-- 
1.9.2



More information about the vcs-home mailing list