16 lines
314 B
Bash
Executable file
16 lines
314 B
Bash
Executable file
#!/bin/sh
|
|
|
|
indent() {
|
|
sed -u 's/^/ /'
|
|
}
|
|
|
|
echo "-----> 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
|