#!/bin/bash #/ NAME #/ init -- #/ #/ SYNOPSIS #/ #/ init # 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/libexec/_treadstone" DEFINE_boolean "helpers" "$FLAGS_FALSE" "Generate the bin and libexec helpers" "H" function main { local dollar='$' if [[ "$FLAGS_helpers" = "$FLAGS_TRUE" ]]; then mkdir -p "libexec" cp -f "$shome/libexec/aohelper.template" "libexec/aohelper" chmod 755 "libexec/aohelper" for nm_cmd in activate check compare debug deploy dna hosts lock migrate proxy release restart rollback shell stage unlock signoff; do ln -nfs "../libexec/aohelper" bin/$nm_cmd done else if [[ "$#" < 1 ]]; then logger_fatal "missing application name" exit 1 fi local nm_app="$1"; shift cat > "Capfile" <&1 >/dev/null; } || #{ruby_loader} bundle --local --path vendor/bundle >/dev/null" end end end # overrides namespace :deploy do task :bundle do ${nm_app}.bundle.ruby end end # interesting hosts Deploy self, __FILE__ do |admin, node| if node["run_list"].include?("role[something_something]") { :deploy => { } } end end EOF mkdir -p "config" cat > "config/deploy.yml" <