aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-05-25 20:17:55 -0400
committerTeddy Wing2015-05-25 20:17:55 -0400
commitd0261a1d1ee67b905830b8315f8ec247d561c3a7 (patch)
tree96facb736569afe8bca8686051b2ea5d12a4c05f
parenta1d56cd30c9d894a6eed2a3be78f6723877d0db3 (diff)
downloadBeginning-Ruby-Exercises-d0261a1d1ee67b905830b8315f8ec247d561c3a7.tar.bz2
Add Makefile
Add targets that allow me to create a zip of the exercises for sending. We copy all the needed files to a new directory, then zip the solutions file so it isn't immediately accessible (wouldn't want to accidentally open the solutions file if you didn't mean to), and then zips the whole thing for easy sending. Finally, we clean up the mess.
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..83bbd6e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+pack: collect zip clean
+
+collect:
+ mkdir ruby-exercises
+ cp -a exercises.rb exercises_solutions.rb exercises_spec.rb run_test.sh ruby-exercises
+
+zip:
+ zip ruby-exercises/exercises_solutions.rb.zip ruby-exercises/exercises_solutions.rb
+ rm ruby-exercises/exercises_solutions.rb
+ zip -r ruby-exercises.zip ruby-exercises
+
+clean:
+ rm -rf ruby-exercises
+
+full_clean: clean
+ rm ruby-exercises.zip