-
Notifications
You must be signed in to change notification settings - Fork 33
File info: autotune build
KavyaSukumar edited this page Jul 2, 2015
·
1 revision
autotune-build
is an executable file that builds the static site. Usually a shell script, but could be python, ruby or whatevs.
It should...
- Read the data from
/dev/stdin
. - Make the configuration data available to the project.
- Build the project.
Configuration is available to this file via standard input. Eg: DATA=$(</dev/stdin)
Make sure that the file has execution permission.
chmod +x autotune-build
Example Middleman blueprint build file
#!/bin/bash
BUILD_COMMAND="bundle exec middleman build"
INPUT_DATA=$(</dev/stdin)
SAVE_DATA_TO=data/autotune.json
echo "Saving autotune data to $SAVE_DATA_TO"
mkdir -p `dirname $SAVE_DATA_TO`
echo "$INPUT_DATA" > $SAVE_DATA_TO
$BUILD_COMMAND