[buildout]
extends = 
  ../coreutils/buildout.cfg
  ../bash/buildout.cfg

[randomsleep]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
  inline:#!${bash:location}/bin/bash
  [ $# = 1 ] || {
    echo "usage: ${:_buildout_section_name_} maxseconds"
    exit 1
  }
  exec ${coreutils:location}/bin/sleep $((RANDOM * $1 >> 15)).$((RANDOM * 100 >> 15))
