tweak functionality
This commit is contained in:
parent
0135768760
commit
dc29dcf9b7
1 changed files with 4 additions and 6 deletions
10
bin/compile
10
bin/compile
|
@ -6,13 +6,11 @@ indent() {
|
||||||
|
|
||||||
echo "-----> Found a hello.txt"
|
echo "-----> Found a hello.txt"
|
||||||
|
|
||||||
# if hello.txt has contents, display them (indented to align)
|
# if hello.txt is empty, abort the build
|
||||||
# otherwise error
|
|
||||||
|
|
||||||
if [ ! -s $1/hello.txt ]; then
|
if [ ! -s $1/hello.txt ]; then
|
||||||
echo "hello.txt was empty" | indent
|
echo "hello.txt was empty" | indent
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
echo "hello.txt is not empty, here are the contents" | indent
|
|
||||||
cat $1/hello.txt | indent
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# replace hello with goodbye in a new file
|
||||||
|
cat $1/hello.txt | sed -e "s/[Hh]ello/Goodbye/g" > $1/goodbye.txt
|
||||||
|
|
Loading…
Reference in a new issue