#!/bin/bash test "$BASH_SOURCE" = "" && echo "This script can be sourced only from bash" && return SCRIPT_SOURCE=$BASH_SOURCE test "$SCRIPT_SOURCE" = "$0" && echo "Script is being run, should be sourced" && exit 1 SCRIPT_DIR=$(dirname "${SCRIPT_SOURCE}") ZEEKR_BASE=$(cd "${SCRIPT_DIR}"; pwd) ZEEKR_TARGET=$ZEEKR_BASE/target/ ZEEKR_PROTO_IDL_PATH=$ZEEKR_TARGET/usr/idl ZEEKR_BIN_PATH=$ZEEKR_TARGET/aarch64/usr/bin ZEEKR_LIB_PATH=$ZEEKR_TARGET/aarch64/usr/lib ZEEKR_INCLUDE_PATH=$ZEEKR_TARGET/usr/include ZEEKR_CMAKE_INSTALL_PATH=$ZEEKR_TARGET/aarch64/usr/cmake ZEEKR_PROTOC_EXEC=$ZEEKR_BASE/host/protoc/protoc ZEEKR_PREBUILD=$ZEEKR_TARGET/aarch64/prebuild MAKEFLAGS=-I$ZEEKR_TARGET/usr/include PATH=$ZEEKR_TARGET/aarch64/usr/bin:$ZEEKR_TARGET/aarch64/usr/lib:$PATH export ZEEKR_TARGET ZEEKR_PROTO_IDL_PATH ZEEKR_BIN_PATH ZEEKR_LIB_PATH ZEEKR_INCLUDE_PATH ZEEKR_CMAKE_INSTALL_PATH ZEEKR_PREBUILD ZEEKR_PROTOC_EXEC MAKEFLAGS PATH echo ZEEKR_PROTO_IDL_PATH=$ZEEKR_PROTO_IDL_PATH echo ZEEKR_BIN_PATH=$ZEEKR_BIN_PATH echo ZEEKR_LIB_PATH=$ZEEKR_LIB_PATH echo ZEEKR_INCLUDE_PATH=$ZEEKR_INCLUDE_PATH echo ZEEKR_CMAKE_INSTALL_PATH=$ZEEKR_CMAKE_INSTALL_PATH echo ZEEKR_PROTOC_EXEC=$ZEEKR_PROTOC_EXEC echo ZEEKR_PREBUILD=$ZEEKR_PREBUILD #Do not edit past this line
时间: 2023-08-06 18:02:36 浏览: 170
bash-preexec:像Zsh一样,Bash的preexec和precmd函数
这是一个Bash脚本,主要用于设置环境变量和路径。它会将一些路径和变量设置为全局变量,以便在后续的脚本中使用。
以下是一些设置的路径和变量:
- `ZEEKR_BASE`:脚本所在的基础路径。
- `ZEEKR_TARGET`:目标路径。
- `ZEEKR_PROTO_IDL_PATH`:IDL文件的路径。
- `ZEEKR_BIN_PATH`:二进制文件的路径。
- `ZEEKR_LIB_PATH`:库文件的路径。
- `ZEEKR_INCLUDE_PATH`:头文件的路径。
- `ZEEKR_CMAKE_INSTALL_PATH`:CMake安装路径。
- `ZEEKR_PROTOC_EXEC`:protoc执行文件的路径。
- `ZEEKR_PREBUILD`:预构建文件的路径。
最后,脚本会输出设置的路径和变量,以供检查使用。
请注意,这段脚本中有一些特定于环境和项目的设置,可能需要根据具体情况进行调整。
阅读全文