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

Unified Diff: modules/updateserver/templates/update_update_manifests.erb

Issue 5071748311547904: Issue 1094 - Generate update manifests on the update server (Closed)
Patch Set: Addressed comments Created July 25, 2014, 10:30 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/updateserver/manifests/init.pp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/updateserver/templates/update_update_manifests.erb
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/updateserver/templates/update_update_manifests.erb
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+lock_file="<%= base_dir %>/update_update_manifests.lock"
+
+exec 9>"$lock_file"
+if ! flock -n 9; then
+ exit 0
+fi
+
+<% repositories_to_sync.each do |repository| %>
+hg pull -q -R "<%= base_dir %>/<%= repository %>"
+<% end %>
+
+export PYTHONPATH=/opt/sitescripts
+python -m sitescripts.extensions.bin.updateUpdateManifests
+
+rm -f "$lock_file"
« no previous file with comments | « modules/updateserver/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld