From dc29dcf9b7ecc6f084f4695bd544831bf29ab079 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Thu, 13 Oct 2011 10:34:34 -0700 Subject: [PATCH] tweak functionality --- bin/compile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/compile b/bin/compile index f10b472..a9081c0 100755 --- a/bin/compile +++ b/bin/compile @@ -6,13 +6,11 @@ indent() { echo "-----> Found a hello.txt" -# if hello.txt has contents, display them (indented to align) -# otherwise error - +# if hello.txt is empty, abort the build 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 + +# replace hello with goodbye in a new file +cat $1/hello.txt | sed -e "s/[Hh]ello/Goodbye/g" > $1/goodbye.txt