Skip to content

Commit

Permalink
Merge pull request #1874 from sktometometo/PR/fix-install-sh-for-cross
Browse files Browse the repository at this point in the history
[cross] add LANG=C for ping reachability check
  • Loading branch information
k-okada authored Oct 16, 2023
2 parents 8f2f3d3 + e7acdb6 commit cfae93d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsk_unitree_robot/cross/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function copy_data () {
fi

# Check if robot is reachable
reachability=$(ping -c4 ${hostname} 2>/dev/null | awk '/---/,0' | grep -Po '[0-9]{1,3}(?=% packet loss)')
reachability=$(LANG=C ping -c4 ${hostname} 2>/dev/null | awk '/---/,0' | grep -Po '[0-9]{1,3}(?=% packet loss)')
if [ -z "$reachability" ] || [ "$reachability" == 100 ]; then
echo "ERROR: ${hostname} unreachable" 1>&2
exit 2
Expand Down

0 comments on commit cfae93d

Please sign in to comment.