All pastes #2054442 Raw Edit

resume.subr

public shellscript v1 · immutable
#2054442 ·published 2011-05-06 04:54 UTC
rendered paste body
#!/bin/bash# Author: Kevin Sweeney <kevin.t.sweeney at gmail dotcom># Date: 4 May 2011if [[ -n $RESUME_SUBR_H ]]; then    trueelse    RESUME_SUBR_H=truefunction define_class {    local classname="$1"    shift    define_function "$classname:" \      "define_object \$1 $*"}function define_object {    local namespace="$1"    local instance_field=""    shift    for instance_field in "$@"    do        add_instance_field "$namespace" "$instance_field"    done    if [[ -z $NOAPPEND ]]; then      define_function $namespace+ \         "${namespace}__BULLETS[\${#${namespace}__BULLETS[*]}]=\"\$1\""      define_function ${namespace}:__BULLETS \         "echo \"\$${namespace}__BULLETS[@]\""    fi}function add_instance_field {    local DOT="."    [[ -n $NODOT ]] && DOT=""    local namespace="$1"    local instance_field="$2"    define_function "${namespace}${DOT}${instance_field}:" \        "define_function '${namespace}${DOT}${instance_field}?' \"echo \\\"\$*\\\"\""}function define_function {    local function_name="$1"    local function_body="$2"    eval "$function_name () { $function_body; }"}NOAPPEND=true NODOT=true define_object "" \  name streetaddress city state zipcode telephone mobilephone telefax \  emailaddress objectivedefine_class section titledefine_class education name degree graddatedefine_class position title startdate enddate employerfi # RESUME_SUBR_H