Permalink
Browse files

poop can digest a recipe in recipes/

  • Loading branch information...
1 parent 3c5672e commit 929e9bcb9ac1febe855b8f56eaed0e559e761405 @defn defn committed Oct 6, 2012
Showing with 34 additions and 22 deletions.
  1. +6 −0 bin/_poop
  2. +4 −22 libexec/poop
  3. +24 −0 recipes/meh
View
@@ -89,5 +89,11 @@ function install_options {
fi
}
+function recipe {
+ local nm_recipe="$1"; shift
+ set --
+ source "$shome/recipes/$nm_recipe"
+}
+
_poop_resource=
end
View
@@ -15,28 +15,10 @@ require 'poop'
# entry point
function main {
- directory "meh"
- mode 0750
- end
-
- directory "meh/mon"
- mode 0700
- end
-
- directory "meh/meh"
- end
-
- directory "meh/meh"
- action delete
- end
-
- directory "meh/mon"
- action delete
- end
-
- directory "meh"
- action delete
- end
+ local nm_recipe
+ for nm_recipe in "$@"; do
+ recipe "$nm_recipe"
+ done
}
# parse the command-line
View
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+directory "meh"
+ mode 0750
+end
+
+directory "meh/mon"
+ mode 0700
+end
+
+directory "meh/meh"
+end
+
+directory "meh/meh"
+ action delete
+end
+
+directory "meh/mon"
+ action delete
+end
+
+directory "meh"
+ action delete
+end

0 comments on commit 929e9bc

Please sign in to comment.