Skip to content
Browse files

tweak functionality

  • Loading branch information...
1 parent 0135768 commit dc29dcf9b7ecc6f084f4695bd544831bf29ab079 @ddollar ddollar committed Oct 13, 2011
Showing with 4 additions and 6 deletions.
  1. +4 −6 bin/compile
View
10 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

0 comments on commit dc29dcf

Please sign in to comment.
Something went wrong with that request. Please try again.