From: Lorenzo Cappelletti Date: Fri, 25 Apr 2014 13:07:52 +0000 (+0200) Subject: bootstrap: add support to stdin X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/bdb2e6d37714e82fddeb435a9768b4fbbe31037f?ds=inline;hp=-c bootstrap: add support to stdin --- bdb2e6d37714e82fddeb435a9768b4fbbe31037f 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'"