我目前正在尝试创建自定义 mLinux 镜像,并且我正在按照此网站的说明进行操作:http://www.multitech.net/developer/software/mlinux/mlinux-building-images/building-a-custom-linux-image/
我跟着他们,直到此时一切正常。
当我尝试运行安装文件时(包括这段代码:
set -e
BUILDCONF=build/conf/local.conf
if [ "$1" != "--update" ]; then
echo ""
echo "Setting up git hooks..."
ln -s ../../scripts/git-hooks/post-merge .git/hooks/post-merge || true
ln -s ../../scripts/git-hooks/post-checkout .git/hooks/post-checkout ||
true
ln -s ../../scripts/git-hooks/pre-commit .git/hooks/pre-commit || true
ln -s ../../scripts/git-hooks/pre-push .git/hooks/pre-push || true
fi
echo ""
echo "Updating git submodules..."
git submodule update --init
)
我收到每个 Hook 的以下错误消息: 无法创建快捷方式 .gt/hooks/( Hook 的名称):找不到文件或目录(翻译自德语)。 另外还有:git: submodule is not a command。 有没有人知道我可能忘记了什么/哪里出了问题?
提前致谢!
最佳答案
The yocto version I am using for Edison is this one: https://github.com/edison-fw/meta-intel-edison
The problem happens because the git version on Edison board is missing some parts. In this case the git-submodules binary is missing in
/usr/libexec/git-core
所以首先检查你的Git安装是否在你的构建环境中完成。
如果没有,您可能需要使用从更完整的发行版中获取的二进制文件来完成它。
关于linux - 使用带有 git Hook 的脚本时找不到文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56208737/