macOS下使用fswatch配合VScode 终端rsync同步更新
安装fswatch
brew install fswatch
VScode 终端运行脚本
cd local_path
running=true
while $running; do
echo '-------------'
fswatch -r -L -1 *
date
rsync -avP --omit-dir-times --no-perms --no-group --no-owner --progress -e 'ssh -p 2222' ./ username@host:/destination_path/
# git push
done &
运行脚本可以修改加入 git提交
none