Tente isso (observe o!)
dir1=/source/dir/path/
while ! inotifywait -qqre modify "$dir1"; do
rm -r /destination/dir/path
find /source/dir/path/ -name .svn -exec rm -rf '{}' \;
cp -ruv /source/dir/path/* /destination/dir/path/
done
Eu tenho o seguinte script bash:
#!/bin/sh
dir1=/source/dir/path/
while inotifywait -qqre modify "$dir1"; do
rm -r /destination/dir/path
find /source/dir/path/ -name .svn -exec rm -rf '{}' \;
cp -ruv /source/dir/path/* /destination/dir/path/
done
o problema é que os primeiros 2 comandos estão funcionando bem, mas o processo é interrompido depois de executar (com êxito) o comando "find -exec". Alguma ideia?
BTW- se eu remover o "find -exec" tudo corre bem.
Tente isso (observe o!)
dir1=/source/dir/path/
while ! inotifywait -qqre modify "$dir1"; do
rm -r /destination/dir/path
find /source/dir/path/ -name .svn -exec rm -rf '{}' \;
cp -ruv /source/dir/path/* /destination/dir/path/
done
Tags rm inotify shell-script