generated from me/template-mit
Modify how the default branch is determined.
This commit is contained in:
17
rc_shared.sh
17
rc_shared.sh
@@ -57,11 +57,19 @@ alias scan="nmap -A -p- --script=vuln "
|
||||
|
||||
# Related specifically to this project. #
|
||||
|
||||
branch="$BRANCH"
|
||||
if [[ -z "$branch" ]]; then
|
||||
branch="$PROD_GIT_BRANCH"
|
||||
fi
|
||||
if [[ -z "$branch" ]]; then
|
||||
branch="dev"
|
||||
fi
|
||||
|
||||
function update-shared {
|
||||
log "`date` - Reloading the '~/.rc_shared' file from env-shared.\n"
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
branch="$1"
|
||||
if [[ -z "$branch" ]]; then
|
||||
branch="dev"
|
||||
fi
|
||||
|
||||
dir="shared-rc-deleteme"
|
||||
@@ -99,11 +107,12 @@ alias shared-reload="update-shared"
|
||||
project="$HOME/.env-shared"
|
||||
function update-shared2 {
|
||||
if [[ ! -d $project ]]; then
|
||||
|
||||
git clone https://git.hyperling.com/me/env-shared \
|
||||
$dir --branch=$branch
|
||||
fi
|
||||
}
|
||||
if [[ -d $project ]]; then
|
||||
git -C $project status
|
||||
git -C $project status | grep TBD
|
||||
fi &
|
||||
|
||||
# Shortcuts #
|
||||
|
||||
Reference in New Issue
Block a user