首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用带有git挂钩的脚本时找不到文件或目录

使用带有git挂钩的脚本时找不到文件或目录
EN

Stack Overflow用户
提问于 2019-05-19 14:25:47
回答 1查看 308关注 0票数 1

我目前正在尝试创建一个自定义的mLinux图像,我正在按照这个网站的说明:http://www.multitech.net/developer/software/mlinux/mlinux-building-images/building-a-custom-linux-image/

我跟踪了他们直到现在一切都正常。

当我试图运行安装文件时(包括以下代码):

代码语言:javascript
复制
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

)

对于每个钩子,我得到以下错误消息:无法创建快捷方式. get /hooks/(钩子名称):未找到文件或目录(从德语翻译)。另外: git:子模块不是命令。有没有人有什么想法,我可能会忘记/什么是错的?

提前谢谢你!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-20 05:06:03

As show here

我为爱迪生使用的yocto版本是这样的:https://github.com/edison-fw/meta-intel-edison 这个问题之所以发生,是因为爱迪生板上的git版本缺少了一些部件。在本例中,/usr/libexec/git-core中缺少git-子模块二进制文件。

因此,首先检查您的Git安装是否在您的构建环境中完成。

如果不是,您可能需要使用更完整的发行版中的二进制文件来完成它。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56208737

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档