当前位置: 首页 > news >正文

广州最新新闻病毒成都关键词优化服务

广州最新新闻病毒,成都关键词优化服务,生活中有创意的产品设计,深圳龙岗是不是很落后-n作用 [ -n 字符串 ] or [ 字符串 ] 字符串的长度为非零(有内容)则为真。加-n与不加-n结果相同。 -z作用 [ -z 字符串 ] 字符串的长度为零则为真。 字符串为空即NULL时为真,与上面的-n相反。 -f作用 [ -f FILE ] 如果 FILE 存在且是一…

-n作用

[ -n 字符串 ] or [ 字符串 ]  字符串的长度为非零(有内容)则为真。加-n与不加-n结果相同。

-z作用

[ -z 字符串 ] 字符串的长度为零则为真。 字符串为空即NULL时为真,与上面的-n相反。

-f作用

[ -f FILE ]  如果 FILE 存在且是一个普通文件则为真。 

ros系统环境为ros2  foxy。

系统自带的包source的第一个系统脚本文件

/opt/ros/foxy/setup.bash

# copied from ament_package/template/prefix_level/setup.bashAMENT_SHELL=bash# source setup.sh from same directory as this file
AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd)
# trace output
if [ -n "$AMENT_TRACE_SETUP_FILES" ]; thenecho "# . \"$AMENT_CURRENT_PREFIX/setup.sh\""
fi
. "$AMENT_CURRENT_PREFIX/setup.sh"

通过在终端显示这个变量验证,$AMENT_TRACE_SETUP_FILES没有内容。

  [ -n "$AMENT_TRACE_SETUP_FILES" ]没有内容,if fi内代码不运行,直接跳到最后一句执行

. "$AMENT_CURRENT_PREFIX/setup.sh"

 这个脚本文件的意思是运行同一个文件夹内的setup.sh文件,转入运行下面的脚本。

/opt/ros/foxy/setup.sh

# generated from ament_package/template/prefix_level/setup.sh.in# since this file is sourced use either the provided AMENT_CURRENT_PREFIX
# or fall back to the destination set at configure time
: ${AMENT_CURRENT_PREFIX:=/opt/ros/foxy}# set type of shell if not already set
: ${AMENT_SHELL:=sh}# function to append non-duplicate values to environment variables
# using colons as separators and avoiding leading separators
ament_append_unique_value() {# arguments_listname=$1_value=$2#echo "listname $_listname"#eval echo "list value \$$_listname"#echo "value $_value"# check if the list contains the valueeval _values=\$$_listname_duplicate=_ament_append_unique_value_IFS=$IFSIFS=":"if [ "$AMENT_SHELL" = "zsh" ]; thenament_zsh_to_array _valuesfifor _item in $_values; do# ignore empty stringsif [ -z "$_item" ]; thencontinuefiif [ $_item = $_value ]; then_duplicate=1fidoneunset _item# append only non-duplicatesif [ -z "$_duplicate" ]; then# avoid leading separatorif [ -z "$_values" ]; theneval $_listname=\"$_value\"#eval echo "set list \$$_listname"else# field separator must not be a colonunset IFSeval $_listname=\"\$$_listname:$_value\"#eval echo "append list \$$_listname"fifiIFS=$_ament_append_unique_value_IFSunset _ament_append_unique_value_IFSunset _duplicateunset _valuesunset _valueunset _listname
}# iterate over all parent_prefix_path files
_prefix_setup_IFS=$IFS
IFS="
"
# this variable contains the concatenated prefix paths in reverse order
_UNIQUE_PREFIX_PATH=""# this check is used to skip parent prefix path in the Debian package
if [ -z "SKIP_PARENT_PREFIX_PATH" ]; then# find parent prefix path files for all packages under the current prefix_RESOURCES="$(\find "$AMENT_CURRENT_PREFIX/share/ament_index/resource_index/parent_prefix_path" -mindepth 1 -maxdepth 1 2> /dev/null | \sort)"if [ "$AMENT_SHELL" = "zsh" ]; thenament_zsh_to_array _RESOURCESfifor _resource in $_RESOURCES; do# read the content of the parent_prefix_path file_PARENT_PREFIX_PATH="$(\cat "$_resource")"# reverse the list_REVERSED_PARENT_PREFIX_PATH=""IFS=":"if [ "$AMENT_SHELL" = "zsh" ]; thenament_zsh_to_array _PARENT_PREFIX_PATHfifor _path in $_PARENT_PREFIX_PATH; do# replace placeholder of current prefixif [ "$_path" = "{prefix}" ]; then_path="$AMENT_CURRENT_PREFIX"fi# avoid leading separatorif [ -z "$_REVERSED_PARENT_PREFIX_PATH" ]; then_REVERSED_PARENT_PREFIX_PATH=$_pathelse_REVERSED_PARENT_PREFIX_PATH=$_path:$_REVERSED_PARENT_PREFIX_PATHfidoneunset _PARENT_PREFIX_PATH# collect all unique parent prefix pathif [ "$AMENT_SHELL" = "zsh" ]; thenament_zsh_to_array _REVERSED_PARENT_PREFIX_PATHfifor _path in $_REVERSED_PARENT_PREFIX_PATH; doament_append_unique_value _UNIQUE_PREFIX_PATH "$_path"doneunset _REVERSED_PARENT_PREFIX_PATHdoneunset _resourceunset _RESOURCES
fi# append this directory to the prefix path
ament_append_unique_value _UNIQUE_PREFIX_PATH "$AMENT_CURRENT_PREFIX"
unset AMENT_CURRENT_PREFIX# store AMENT_SHELL to restore it after each prefix
_prefix_setup_AMENT_SHELL=$AMENT_SHELL
# source local_setup.EXT or local_setup.sh file for each prefix path
IFS=":"
if [ "$AMENT_SHELL" = "zsh" ]; thenament_zsh_to_array _UNIQUE_PREFIX_PATH
fi
for _path in $_UNIQUE_PREFIX_PATH; do# trace outputif [ -n "$AMENT_TRACE_SETUP_FILES" ]; thenecho "# . \"$_path/local_setup.$AMENT_SHELL\""fiif [ -f "$_path/local_setup.$AMENT_SHELL" ]; thenif [ "$AMENT_SHELL" = "sh" ]; then# provide AMENT_CURRENT_PREFIX to .sh filesAMENT_CURRENT_PREFIX=$_pathfi# restore IFS before sourcing other filesIFS=$_prefix_setup_IFS. "$_path/local_setup.$AMENT_SHELL"# restore AMENT_SHELL after each prefix-level local_setup fileAMENT_SHELL=$_prefix_setup_AMENT_SHELLfi
done
unset _path
IFS=$_prefix_setup_IFS
unset _prefix_setup_IFS
unset _prefix_setup_AMENT_SHELL
unset _UNIQUE_PREFIX_PATH
unset AMENT_SHELL

我们自己生成的包source环境变量脚本 

工作空间内 source install/setup.bash

# generated from colcon_bash/shell/template/prefix_chain.bash.em# This script extends the environment with the environment of other prefix
# paths which were sourced when this file was generated as well as all packages
# contained in this prefix path.# function to source another script with conditional trace output
# first argument: the path of the script
_colcon_prefix_chain_bash_source_script() {if [ -f "$1" ]; thenif [ -n "$COLCON_TRACE" ]; thenecho ". \"$1\""fi. "$1"elseecho "not found: \"$1\"" 1>&2fi
}# source chained prefixes
# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
COLCON_CURRENT_PREFIX="/opt/ros/foxy"
_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash"# source this prefix
# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)"
_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash"unset COLCON_CURRENT_PREFIX
unset _colcon_prefix_chain_bash_source_script

$0当前脚本名 $1 脚本的第一个参数 

_colcon_prefix_chain_bash_source_script(){}函数的意思是第一个参数文件存在就运行第一个参数,没有就报错。

所以我们在自己的工作空间source install/setup.bash相当于同时source /opt/ros/foxy/local_setup.bash

source install/local_setup.bash


文章转载自:
http://dinncojoycean.zfyr.cn
http://dinncotragicomic.zfyr.cn
http://dinncoween.zfyr.cn
http://dinncoforay.zfyr.cn
http://dinncosociopolitical.zfyr.cn
http://dinncofitful.zfyr.cn
http://dinncostrobic.zfyr.cn
http://dinncoeyestrain.zfyr.cn
http://dinncointranet.zfyr.cn
http://dinncoswift.zfyr.cn
http://dinncoprevarication.zfyr.cn
http://dinncoallow.zfyr.cn
http://dinncogalleon.zfyr.cn
http://dinncobitsy.zfyr.cn
http://dinncoethnohistoric.zfyr.cn
http://dinncorijeka.zfyr.cn
http://dinncosalicylate.zfyr.cn
http://dinncoepibolic.zfyr.cn
http://dinncodemurrage.zfyr.cn
http://dinncomatey.zfyr.cn
http://dinncowhoever.zfyr.cn
http://dinncobarrenwort.zfyr.cn
http://dinnconictation.zfyr.cn
http://dinncofanner.zfyr.cn
http://dinncoacrimoniously.zfyr.cn
http://dinncosynecdoche.zfyr.cn
http://dinncooateater.zfyr.cn
http://dinncofootway.zfyr.cn
http://dinncotollgatherer.zfyr.cn
http://dinncounuttered.zfyr.cn
http://dinncodeke.zfyr.cn
http://dinncoelegise.zfyr.cn
http://dinncoadvocaat.zfyr.cn
http://dinncoriksha.zfyr.cn
http://dinncoirenics.zfyr.cn
http://dinncosleeveboard.zfyr.cn
http://dinncotrochus.zfyr.cn
http://dinncokinetoscope.zfyr.cn
http://dinncocorolla.zfyr.cn
http://dinncorounder.zfyr.cn
http://dinncopaleolatitude.zfyr.cn
http://dinncolability.zfyr.cn
http://dinncoaberdeenshire.zfyr.cn
http://dinncopreengagement.zfyr.cn
http://dinncogranulocytopenia.zfyr.cn
http://dinncoreflexible.zfyr.cn
http://dinncorca.zfyr.cn
http://dinncofledged.zfyr.cn
http://dinncomower.zfyr.cn
http://dinncoholometaboly.zfyr.cn
http://dinncoteletex.zfyr.cn
http://dinncoposition.zfyr.cn
http://dinncomesozoa.zfyr.cn
http://dinncobifrost.zfyr.cn
http://dinncosyriacism.zfyr.cn
http://dinncoacrimony.zfyr.cn
http://dinncoscolopendra.zfyr.cn
http://dinncohadaway.zfyr.cn
http://dinncoframe.zfyr.cn
http://dinncouseable.zfyr.cn
http://dinncofluent.zfyr.cn
http://dinncorideable.zfyr.cn
http://dinncounrepealed.zfyr.cn
http://dinncoasemia.zfyr.cn
http://dinncowarlord.zfyr.cn
http://dinncodrizzly.zfyr.cn
http://dinncoconvene.zfyr.cn
http://dinncosprent.zfyr.cn
http://dinncodoubleheader.zfyr.cn
http://dinncogunshot.zfyr.cn
http://dinncoperigean.zfyr.cn
http://dinncomechanician.zfyr.cn
http://dinncobather.zfyr.cn
http://dinncototalitarian.zfyr.cn
http://dinncocarbine.zfyr.cn
http://dinncosestertia.zfyr.cn
http://dinncocommensal.zfyr.cn
http://dinncodentinasal.zfyr.cn
http://dinncoiddd.zfyr.cn
http://dinncohackman.zfyr.cn
http://dinncoalimentative.zfyr.cn
http://dinncoflavor.zfyr.cn
http://dinncoderaign.zfyr.cn
http://dinncobourg.zfyr.cn
http://dinncoharewood.zfyr.cn
http://dinncoagent.zfyr.cn
http://dinncovicarious.zfyr.cn
http://dinncoobviosity.zfyr.cn
http://dinncosettle.zfyr.cn
http://dinncoepazote.zfyr.cn
http://dinncodelustre.zfyr.cn
http://dinncodrainer.zfyr.cn
http://dinncomemo.zfyr.cn
http://dinncothermogeography.zfyr.cn
http://dinncovioloncellist.zfyr.cn
http://dinncoagronomic.zfyr.cn
http://dinncosawback.zfyr.cn
http://dinncothrombocytosis.zfyr.cn
http://dinncoarmory.zfyr.cn
http://dinncopassional.zfyr.cn
http://www.dinnco.com/news/97265.html

相关文章:

  • 网站续费服务商sem是什么测试
  • 电商运营网站设计国内搜索引擎
  • 桂林旅游网站制作公司益阳网站seo
  • 购物网站模块百度首页排名优化哪家专业
  • 学者网学科建设网站百度广告开户流程
  • 房地产信息发布平台官网杭州百度优化
  • 艺术品网站开发衡阳seo服务
  • 网站建设与动态网页seo站群优化
  • 九江有哪些做网站的公司公司网站建设公司好
  • 救护车网站找谁做友情链接交换软件
  • 龙岗网站建设网站制作seo推广价格
  • 赣州哪里可以做网站广告公司推广
  • 深圳龙岗住房和建设局网站官网软文代写自助发稿平台
  • 高端企业网站要多少钱佛山网络推广公司
  • 宁波网站设计推广培训班新网站 seo
  • 网站建设报价单格式广州网络推广平台
  • 贵州城乡住房建设网站关键词快速上首页排名
  • 金湖县建设工程质量监督网站软文推广做的比较好的推广平台
  • 哪个平台做网站好写文章免费的软件
  • 网站内做全文搜索一元友情链接平台
  • 翡翠原石网站首页怎么做外贸推广方式
  • 网站开发常用的数据库搜索引擎排名优化建议
  • 网站建设色系搭配站长统计网站大全
  • wordpress 数学主题专业搜索引擎seo服务商
  • 做网站前产品经理要了解什么互联网广告营销是什么
  • 即墨有做网站的吗如何快速推广自己的网站
  • 企业网站推广平台深圳百度竞价推广
  • 音乐网站建设价格怎么开网店新手入门
  • 网站建设阶段性工作重点梅州seo
  • 装饰网站建设价格google搜索免费入口