devscript: hoist configurable global variables

This commit is contained in:
Roland Walker 2014-01-31 11:28:48 -05:00
parent 73e15095f6
commit abe29d1b51
3 changed files with 23 additions and 13 deletions

View File

@ -11,6 +11,12 @@ set -e # exit on any uncaught error
set +o histexpand # don't expand history expressions
shopt -s nocasematch # case-insensitive regular expressions
###
### configurable global variables
###
tap_subdir="Library/Taps/phinze-cask"
###
### functions
###
@ -67,9 +73,6 @@ create_dev_links () {
_develop_brew_cask () {
# configurable
local tap_subdir="Library/Taps/phinze-cask"
# initialization
cd_to_project_root
local git_root="$(/bin/pwd)"

View File

@ -11,6 +11,12 @@ set -e # exit on any uncaught error
set +o histexpand # don't expand history expressions
shopt -s nocasematch # case-insensitive regular expressions
###
### configurable global variables
###
tap_subdir="Library/Taps/phinze-cask"
###
### functions
###
@ -64,9 +70,6 @@ remove_dev_links () {
_production_brew_cask () {
# configurable
local tap_subdir="Library/Taps/phinze-cask"
# initialization
cd_to_project_root
local git_root="$(/bin/pwd)"

View File

@ -13,6 +13,17 @@ set -e # exit on any uncaught error
set +o histexpand # don't expand history expressions
shopt -s nocasematch # case-insensitive regular expressions
###
### configurable global variables
###
# these paths relative to project root
cask_paths="Casks"
code_paths="bin developer lib test brew-cask.rb Rakefile Gemfile Gemfile.lock"
doc_paths="LICENSE *.md"
initial_commit="5a0d1d5556e3f963a0d34da46e16ecffa59ea2fc"
end_object="HEAD"
###
### functions
###
@ -63,14 +74,7 @@ verify_git_object () {
_project_stats () {
local initial_commit="5a0d1d5556e3f963a0d34da46e16ecffa59ea2fc"
local start_object="$initial_commit"
local end_object="HEAD"
# these paths relative to project root
local cask_paths="Casks"
local code_paths="bin developer lib test brew-cask.rb Rakefile Gemfile Gemfile.lock"
local doc_paths="LICENSE *.md"
cd_to_project_root
warn_if_off_branch 'master'