heroku-buildpack-hello/bin/compile
Yann Esposito (Yogsototh) 2c80b0649f bash
2012-04-13 14:07:16 +02:00

16 lines
323 B
Bash
Executable file

#!/bin/bash
indent() {
sed -u 's/^/ /'
}
echo "-----> [bash] Found a hello.txt"
# if hello.txt is empty, abort the build
if [ ! -s $1/hello.txt ]; then
echo "hello.txt was empty" | indent
exit 1
fi
# replace hello with goodbye in a new file
cat $1/hello.txt | sed -e "s/[Hh]ello/Goodbye/g" > $1/goodbye.txt