heroku-buildpack-hello/bin/compile

19 lines
397 B
Text
Raw Normal View History

2011-09-26 17:35:37 +00:00
#!/bin/sh
indent() {
sed -u 's/^/ /'
}
echo "-----> Found a hello.txt"
# if hello.txt has contents, display them (indented to align)
# otherwise error
if [ ! -s $1/hello.txt ]; then
echo "hello.txt was empty" | indent
exit 1
else
echo "hello.txt is not empty, here are the contents" | indent
cat $1/hello.txt | indent
fi