2012-04-13 12:07:16 +00:00
|
|
|
#!/bin/bash
|
2011-09-26 17:35:37 +00:00
|
|
|
|
2011-10-09 17:38:44 +00:00
|
|
|
indent() {
|
|
|
|
sed -u 's/^/ /'
|
|
|
|
}
|
2011-09-26 17:35:37 +00:00
|
|
|
|
2012-04-13 12:07:16 +00:00
|
|
|
echo "-----> [bash] Found a hello.txt"
|
2011-09-26 17:35:37 +00:00
|
|
|
|
2011-10-13 17:34:34 +00:00
|
|
|
# if hello.txt is empty, abort the build
|
2011-10-09 17:38:44 +00:00
|
|
|
if [ ! -s $1/hello.txt ]; then
|
|
|
|
echo "hello.txt was empty" | indent
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-10-13 17:34:34 +00:00
|
|
|
|
|
|
|
# replace hello with goodbye in a new file
|
|
|
|
cat $1/hello.txt | sed -e "s/[Hh]ello/Goodbye/g" > $1/goodbye.txt
|