[英]Git post commit and bash on windows
I want to copy all the *.obj files (ignored by the git, but present in the directory) after commit to a directory. 我想在提交到目录后复制所有* .obj文件(被git忽略,但存在于目录中)。
With this script: 使用此脚本:
#!/bin/sh
pwd
branch=$(git rev-parse --symbolic --abbrev-ref HEAD)
echo logging objfiles for $branch
mkdir -p ./OBJ_$branch/
cp -u -f -r *.obj ./OBJ_$branch/
Git says after commit, that "Cannot stat *.obj" Git在提交后说,“无法统计* .obj”
Ia aware of different endlines and this file is saved using PSPad with linux endlines. 我知道不同的结尾行,并且此文件是使用PSPad和Linux结尾行保存的。
Thanks for any help! 谢谢你的帮助!
pwd prints the correct directory. pwd打印正确的目录。
Solved, the problem is this http://www.linuxquestions.org/questions/linux-newbie-8/how-to-do-recursive-file-copy-of-directory-for-specific-files-199134/ 解决了,问题是这个http://www.linuxquestions.org/questions/linux-newbie-8/how-to-do-recursive-file-copy-of-directory-for-specific-files-199134/
cp evidently doesnt know how to do a recursion. cp显然不知道如何进行递归。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.