upload-changes.sh
1 |
|
2 |
rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 shared/planning/ maarten@maartenv.be:/home/maarten/backup/shared/planning |
3 |
|
4 |
echo -e "Sending weekly folder to HQ: " |
5 |
rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 shared/weekly/ maarten@maartenv.be:/home/maarten/backup/shared/weekly |
6 |
|
7 |
echo -e "Sending IDLab folder to HQ: " |
8 |
rsync -r -e 'ssh -p 1111' -a --delete --partial --info=stats1,progress2 IDLab/ maarten@maartenv.be:/home/maarten/backup/IDLab |
9 |
|
10 |
echo -e "Checking all repositories for outstanding commits...\n" |
11 |
cd ~/repositories |
12 |
for directory in */ ; do |
13 |
cd $directory |
14 |
echo -e "Checking $directory...\n" |
15 |
files="$(git status -s)" |
16 |
if [ "${files:0:2}" == " M" ]; then |
17 |
echo -e "Repository $directory has uncommitted modifications!" |
18 |
else |
19 |
git push # Pushing the changes to the upstream repo if applicable |
20 |
fi |
21 |
cd .. # Returning to Repositories |
22 |
done |
23 |
|
24 |
cd ~ |
25 |