这是我的脚本,用于自动化我的静态博客的 git push。当我在终端中一一运行每个命令时,它就可以工作了。我是否需要添加延迟,也许它太快了。pelican 命令(静态网站生成器)需要相当长的时间(2 秒)。在此期间脚本的其余部分是否崩溃?
#!/bin/sh
dropbox
cd blog
pelican . -s /Users/Paul-Arthur/Desktop/Desktop/Dropbox/blog/pelican.conf.py -t subtle
cd output
git add .
git commit -m 'commit'
git push
更新:抱歉,是的,dropbox 是我的 bash_profile 中的自定义命令(这不是问题,我知道它可以工作;))。可悲的是,当我单击我的脚本时,它执行得非常快(但不起作用),所以我看不到错误。
这是 calepin 命令的输出。这些错误是正常的,我希望它能够运行。你认为这是问题所在吗?如果是这样,我该怎么办?
familys-imac:blog Paul-Arthur$ pelican . -s /Users/Paul-Arthur/Desktop/Desktop/Dropbox/blog/pelican.conf.py -t subtle
ERROR: Skipping ./articles/aboutme.md: impossible to find informations about 'title'
ERROR: Skipping ./articles/static_sites.md: impossible to find informations about 'title'
familys-imac:blog Paul