Skip to content

Commit

Permalink
Closes #57 Fix issue where scp progress wasn't working
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlloyd committed Apr 6, 2016
1 parent e9c16ad commit 00d7381
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jmeter-ec2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function runsetup() {
$LOCAL_HOME/install.sh \
$LOCAL_HOME/jmeter-ec2.properties \
$USER@$host:$REMOTE_HOME \
&& echo "done" > $project_home/$DATETIME-$host-scpinstall.out)
&& echo "done" > $project_home/$DATETIME-$host-scpinstall.out) &
done

# check to see if the scp call is complete (could just use the wait command here...)
Expand All @@ -421,8 +421,10 @@ function runsetup() {
do
# Update progress bar
progressBar $instance_count $res
res=$(grep -c "done" $project_home/$DATETIME*scpinstall.out \
| awk -F: '{ s+=$NF } END { print s }') # the awk command here sums up the output if multiple matches were found
# Count how many out files we have for the copy (if the file exists the copy completed)
# Note. We send stderr to dev/null in the ls cmd below to prevent file not found errors filling the screen
# and the sed command here trims whitespace
res=$(ls -l $project_home/$DATETIME*scpinstall.out 2>/dev/null | wc -l | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
sleep 1
done
progressBar $instance_count $res true
Expand Down

0 comments on commit 00d7381

Please sign in to comment.