加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
env 688 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -e
# https://stackoverflow.com/a/246128
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
verbose_flag=""
while getopts vx arg; do
case "$arg" in
v) verbose_flag="--verbose";;
x) set -x;;
esac
done
shift $((OPTIND-1))
export PKG_CONFIG="${DIR}/scripts/pkg-config.sh"
# If this script is being executed, it will be executed under bash
# so the bash source variable should be present. If the variable
# matches the current script, then we are being executed and the
# default argument should be to print the environment.
if [ $# -eq 0 ] && [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
set -- env
fi
if [ $# -gt 0 ]; then exec "$@"; fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化