Permalink
Browse files

poop script, poop library, with a minimal directory source

  • Loading branch information...
defn committed Oct 5, 2012
1 parent 15c10f7 commit 6b218d5befe9bd4e118b23c96dde400abe5d49c7
Showing with 42 additions and 0 deletions.
  1. +15 −0 bin/_poop
  2. +27 −0 bin/poop
View
@@ -0,0 +1,15 @@
+_poop_name=
+_poop_resource=
+
+function directory {
+ _poop_name="$1"; shift
+ _poop_resource="directory"
+}
+
+function do_directory {
+ mkdir -p "${_poop_name}"
+}
+
+function end {
+ eval "do_${_poop_resource}"
+}
View
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+#/ NAME
+#/ poop -- chef-like bash configuration management
+#/
+#/ SYNOPSIS
+#/ poop
+
+# figure out the project root under which bin, lib live
+shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
+
+# load a jason bourne library
+source "$shome/bin/_treadstone"
+require 'poop'
+
+# entry point
+function main {
+ directory "meh"
+ end
+}
+
+# parse the command-line
+parse_command_line "$@" || exit $?
+eval set -- "${FLAGS_ARGV}"
+
+# pass arguments to entry point
+main "$@"

0 comments on commit 6b218d5

Please sign in to comment.