I am working in my home dir and want to sync this dir with other 3 locations in same pc, this is what i done but this code only run the first group of commands and then exits:
Code:
#!/bin/bash
set -e 
cd /media/me/e4*/backups
rsync -uvr --exclude *~ --delete /home/me/tafseerd/ tafseerd/
rsync -uvr --exclude *~ --delete /home/me/tafseer/ tafseer/
chown -R me:me tafseerd
chown -R me:me tafseer
/usr/bin/mst
set -e
cd /store/backups
sync -uvr --exclude *~ --delete /home/me/tafseerd/ tafseerd/
rsync -uvr --exclude *~ --delete /home/me/tafseer/ tafseer/
chown -R me:me tafseerd
chown -R me:me tafseer
set -e
cd /var/www
rsync -uvr --exclude *~ --delete /home/me/tafseerd/ tafseerd/ quran-eu.org/
script exits after /usr/bin/mst command.