> On Aug 11, 2016, at 1:53 AM, [email protected] wrote: > > Revision > 151265 > Author > [email protected] > Date > 2016-08-10 23:53:19 -0700 (Wed, 10 Aug 2016) > Log Message > > mp-buildbot/install-dependencies: write port name, do not repeat text to be > printed > Modified Paths > > • contrib/mp-buildbot/mpbb-install-dependencies > Diff > > Modified: contrib/mp-buildbot/mpbb-install-dependencies (151264 => 151265) > > --- contrib/mp-buildbot/mpbb-install-dependencies 2016-08-11 06:48:51 UTC > (rev 151264) > +++ contrib/mp-buildbot/mpbb-install-dependencies 2016-08-11 06:53:19 UTC > (rev 151265) > > @@ -40,10 +40,14 @@ > > dependencies_count=$(echo "$dependencies" | wc -l | sed 's/ *//g') > > dependencies_counter=1 > > > > - echo "Installing $dependencies_count dependencies:" > - echo "Installing $dependencies_count dependencies:" >> > "$log_status_dependencies" > - echo "$dependencies" | sed -E 's/^/ - /' > - echo "$dependencies" | sed -E 's/^/ - /' >> "$log_status_dependencies" > > + text="Installing $dependencies_count dependencies of $option_port:" > + echo "$text" > + echo "$text" >> "$log_status_dependencies" > +
Rather than having to echo the same thing twice, you can use tee: echo "Installing $dependencies_count dependencies of $option_port:" | tee -a "$log_status_dependencies" This will display the text on stdout and append it to the logfile. _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
