【发布时间】:2021-01-18 06:51:25
【问题描述】:
我想在 WP 中引入几个插件,并制作一个脚本,在 NPM 脚本中从 github 获取它们。
"installplugins": "cd ../../ &&
rm -r mu-plugins && mkdir mu-plugins &&
gh repo clone repo1 mu-plugins &&
gh repo clone repo2 mu-plugins &&
gh repo clone repo3 mu-plugins &&
gh repo clone repo4 mu-plugins &&
gh repo clone repo5 mu-plugins &&
gh repo clone repo6 mu-plugins"
问题是,就在第二个 git repo clone 时,它中断了,因为你的 mu-plugins 文件夹不再是空的。
真的,在一天结束时,我只需要导出 git repo 并将其放入文件夹中,而无需保留所有 git 的花里胡哨,但我似乎无法找到执行 repo 所需的标志组合下载而不是经典的 repo 克隆。
有人可以帮我吗?
【问题讨论】:
标签: git github npm github-cli