Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/updateserver/templates/update_update_manifests.erb

Issue 5071748311547904: Issue 1094 - Generate update manifests on the update server (Closed)
Left Patch Set: Use flock Created July 25, 2014, 9:51 a.m.
Right Patch Set: Run as user sitescripts Created July 25, 2014, 2:17 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 #!/bin/bash 1 #!/bin/bash
2 2
3 lock_file="<%= base_dir %>/update_update_manifests.lock" 3 lock_file="<%= sitescripts_var_dir %>/update_update_manifests.lock"
4 4
5 exec 9>"$lock_file" 5 exec 9>"$lock_file"
6 if ! flock -n 9; then 6 flock -n 9 || exit 0
7 exit 0
8 fi
9 7
10 <% repositories_to_sync.each do |repository| %> 8 <% repositories_to_sync.each do |repository| %>
11 hg pull -q -u -R "<%= base_dir %>/<%= repository %>" 9 hg pull -q -R "<%= sitescripts_var_dir %>/<%= repository %>"
12 <% end %> 10 <% end %>
13 11
14 export PYTHONPATH=/opt/sitescripts 12 export PYTHONPATH=/opt/sitescripts
15 python -m sitescripts.extensions.bin.updateUpdateManifests 13 python -m sitescripts.extensions.bin.updateUpdateManifests
16 14
17 rm -f "$lock_file" 15 rm -f "$lock_file"
LEFTRIGHT

Powered by Google App Engine
This is Rietveld