Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 #!/bin/bash | |
2 | |
3 run_file="/var/run/update_update_manifests" | |
4 | |
5 if [[ -f $run_file ]]; then | |
6 exit 0 | |
Wladimir Palant
2014/07/25 09:50:11
What if this script crashes and doesn't remove the
Felix Dahlke
2014/07/25 10:31:15
Using flock now, are you happy with that? It'll ha
Wladimir Palant
2014/07/25 11:11:02
I'd really prefer a standardized solution that wou
Felix Dahlke
2014/07/25 14:17:56
I've looked into daemon, but I don't like the fact
| |
7 fi | |
8 | |
9 echo "$$" >> "$run_file" | |
10 | |
11 <% repositories_to_sync.each do |repository| %> | |
12 hg pull -q -u -R <%= base_dir %>/<%= repository %> | |
Wladimir Palant
2014/07/25 09:50:11
Updating is unnecessary, the scripts work with the
Felix Dahlke
2014/07/25 10:31:15
Done.
| |
13 <% end %> | |
14 | |
15 export PYTHONPATH=/opt/sitescripts | |
16 python -m sitescripts.extensions.bin.updateUpdateManifests | |
Wladimir Palant
2014/07/25 09:50:11
No need to export the variable if it is only used
Felix Dahlke
2014/07/25 10:31:15
It's shorter that way, I try to stick to 80 chars.
| |
17 | |
18 rm -f "$run_file" | |
OLD | NEW |