代码拉取完成,页面将自动刷新
#!/bin/bash
# Bash script to automatically format LCM source code (currently C and C++).
# Requires `clang-format` utilily, which is part of the LLVM project. More
# information can be found here: https://clang.llvm.org/docs/ClangFormat.html
#
# To install `clang-format` on Ubuntu do:
#
# $ sudo apt install clang-format
#
# On Windows 10 you are recommended to use the Linux Subsystem. You can install
# the Linux Subsystem by doing the following:
#
# 1. Open PowerShell as Administrator, enter the command:
#
# PS C:\> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
#
# 2. Restart the computer.
# 3. Go to the Microsoft Store, install the Ubuntu app.
#
# This script does not format Java, Python, or Lua source code. At the moment,
# it only formats C and C++ sources, i.e., *.h, *.c, *.hpp, and *.cpp. It only
# formats code in certain directories, see below for the full list.
LCM_ROOT="$(cd $(dirname "$0") && pwd)"
function format_c_cpp_dir_r {
find "$1" -regex '.*\.\(c\|h\)\(pp\)?' -print0 | xargs -0 clang-format -i
}
format_c_cpp_dir_r "${LCM_ROOT}/lcm"
format_c_cpp_dir_r "${LCM_ROOT}/lcmgen"
#format_c_cpp_dir_r "${LCM_ROOT}/lcm-examples"
#format_c_cpp_dir_r "${LCM_ROOT}/lcm-test"
#format_c_cpp_dir_r "${LCM_ROOT}/lcm-logger"
#format_c_cpp_dir_r "${LCM_ROOT}/lcm-python"
#format_c_cpp_dir_r "${LCM_ROOT}/lcm-lua"
#format_c_cpp_dir_r "${LCM_ROOT}/liblcm-test"
exit 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。