我有一個斯芬克斯文檔的文件夾,我用inotifywait
(從inotify-tools)看。該腳本重新構建html & singlehtml並刷新Chrome。使inotifywait組將多個文件更新合併爲一個?
#!/bin/sh
inotifywait -mr source --exclude _build -e close_write -e create -e delete -e move | while read file event; do
make html singlehtml
xdotool search --name Chromium key --window %@ F5
done
這工作正常,當我保存單個文件。但是,當我在的舊版本中修改或粘貼source
文件夾中的多個文件時,它會觸發的每個文件的腳本。
是否有一個簡單的解決方法(無需編寫自定義python腳本 - 我可以這樣做),使其在啓動腳本之前等待幾分之一秒?