<p>osmith <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/12733">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Neels Hofmeyr: Looks good to me, approved
  osmith: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">run.sh: more userfriendly "stale configs" message<br><br>Make the message easy to understand at first glance, print what needs to<br>be done to regenerate the configs. Add an empty line before listing the<br>stale file that has been found, so it stands out from the (at this<br>point) less relevant path listings. It looks like the following now:<br><br>$ ./run.sh<br>using config file '/home/user/code/osmo-dev/net/config_2g3g_osmith'<br>on templates '/home/user/code/osmo-dev/net/tmpl_std'<br>with NET_DIR '/home/user/code/osmo-dev/net/osmith'<br><br>Stale: '/home/user/code/osmo-dev/net/tmpl_std/run.sh' is newer than 'run.sh'<br><br>WARNING: STALE CONFIGS - your net configs are older than the templates they should be based on!<br> * Hit enter to continue, and use the stale config files<br> * Hit ^C and run 'make regen' to regenerate your configs<br><br>Change-Id: If225e094619a07a228e0e2f337153ee18cdb420c<br>---<br>M net/fill_config.py<br>M net/tmpl_std/run.sh<br>2 files changed, 9 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/net/fill_config.py b/net/fill_config.py</span><br><span>index e97dab7..5374d62 100755</span><br><span>--- a/net/fill_config.py</span><br><span>+++ b/net/fill_config.py</span><br><span>@@ -96,6 +96,7 @@</span><br><span> </span><br><span> def check_stale(src_path, target_path):</span><br><span>   if file_newer(src_path, target_path):</span><br><span style="color: hsl(120, 100%, 40%);">+    print()</span><br><span>     print('Stale: %r is newer than %r' % (src_path, target_path))</span><br><span>     exit(1)</span><br><span> </span><br><span>diff --git a/net/tmpl_std/run.sh b/net/tmpl_std/run.sh</span><br><span>index f31330b..03f75c1 100755</span><br><span>--- a/net/tmpl_std/run.sh</span><br><span>+++ b/net/tmpl_std/run.sh</span><br><span>@@ -1,5 +1,12 @@</span><br><span> #!/usr/bin/env bash</span><br><span style="color: hsl(0, 100%, 40%);">-../fill_config.py --check-stale || ( echo "STALE CONFIGS. Hit enter to continue anyway."; read enter_to_continue )</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if ! ../fill_config.py --check-stale; then</span><br><span style="color: hsl(120, 100%, 40%);">+      echo</span><br><span style="color: hsl(120, 100%, 40%);">+  echo "WARNING: STALE CONFIGS - your net configs are older than the templates they should be based on!"</span><br><span style="color: hsl(120, 100%, 40%);">+      echo " * Hit enter to continue, and use the stale config files"</span><br><span style="color: hsl(120, 100%, 40%);">+     echo " * Hit ^C and run 'make regen' to regenerate your configs"</span><br><span style="color: hsl(120, 100%, 40%);">+    read enter_to_continue</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span> </span><br><span> dev="${ETH_DEV}"</span><br><span> ip2="${PUBLIC_IP2}"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12733">change 12733</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12733"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-dev </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If225e094619a07a228e0e2f337153ee18cdb420c </div>
<div style="display:none"> Gerrit-Change-Number: 12733 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>