cifsync 301 B

12345678910111213
  1. #!/usr/bin/env bash
  2. if [ "`ping -c 1 corp.wan`" ]; then
  3. if [ -e "/mnt/share" ]; then
  4. USER=`whoami`
  5. unison -batch -perms=0 /mnt/share/work/current/ /home/$USER/src/work/
  6. else
  7. echo "Remote directory not mounted"
  8. fi
  9. else
  10. echo "Corporate network not available"
  11. fi