Skip to content

Commit

Permalink
Extracted core boot framework from goscript.
Browse files Browse the repository at this point in the history
  • Loading branch information
akiellor committed Mar 5, 2014
1 parent 1e766b2 commit adc1cc0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
14 changes: 14 additions & 0 deletions boot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
usage() {
cat <<EOS
$0 [subcommand]
EOS

grep -e "^###" $0 | sed -rn 's/###\s*(.*?): (.*)/\t\1\t\t#\2/p' | sort
}

if ! type $1 2>&1 | grep function > /dev/null; then
usage
exit 1
fi

$1 "${@:2}"
17 changes: 1 addition & 16 deletions go
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,4 @@ shell() {
docker run -t -i -dns `dns-server` services/shell
}

### usage: Prints this usage information
usage() {
cat <<EOS
$0 [subcommand]
EOS

grep -e "^###" $0 | sed -rn 's/###\s*(.*?): (.*)/\t\1\t\t#\2/p' | sort
}

if ! type $1 2>&1 | grep function > /dev/null; then
usage
exit 1
fi

$1 "${@:2}"

source $(dirname $0)/boot

0 comments on commit adc1cc0

Please sign in to comment.