chiark / gitweb /
buildserver: handle loops in bash, not ruby, to save memory
authorHans-Christoph Steiner <hans@eds.org>
Tue, 14 Jun 2016 14:34:13 +0000 (16:34 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 14 Jun 2016 14:34:13 +0000 (16:34 +0200)
commita4615b1def0ae9874211769975136f006abc4867
tree492d94491d9f627ea72053aaa44d54358e758747
parentfc0df30404191a8231beb3255fe41b8b58bbec01
buildserver: handle loops in bash, not ruby, to save memory

Apparently, ruby is quite a memory hog when it forks.  I've been getting
errors like this with ./makebuildserver:

Errno::ENOMEM - script[add_btools_17] (android-sdk::default line 72) had an
  error: Errno::ENOMEM: Cannot allocate memory - fork(2)

So instead of looping in ruby and forking for each loop, handle the looping
in the bash script, so ruby is just calling a single bash script.
buildserver/cookbooks/android-sdk/recipes/default.rb