local/bb/.bashrc.local
This commit is contained in:
@@ -17,7 +17,7 @@ export DEV_CPPINC=-I.
|
||||
export DEV_FINC=-I.
|
||||
|
||||
#I need this to run distributor locally.
|
||||
export PGPASSFILE=$HOME/.fit_pgpass
|
||||
export PGPASSFILE=$HOME/.pgpass
|
||||
export PGSERVICEFILE=$HOME/.fit_pg_service.conf
|
||||
|
||||
export SRC_DIR=$HOME/devel/src
|
||||
@@ -25,6 +25,7 @@ export BOOST_DIR=$SRC_DIR/boost
|
||||
#export TBB_DIR=$SRC_DIR/tbb
|
||||
#export TBB_LIB=$TBB_DIR/build/linux_intel64_gcc_cc4.8.2_libc2.12_kernel2.6.32_release/
|
||||
#export TBB_LIB_DEBUG=$TBB_DIR/build/linux_intel64_gcc_cc4.8.2_libc2.12_kernel2.6.32_debug/
|
||||
export PIP_INDEX_URL=https://artprod.dev.bloomberg.com/artifactory/api/pypi/bloomberg-pypi/simple
|
||||
|
||||
alias bb='cd $HOME/devel/bb >/dev/null'
|
||||
#complete -f -X '!*.mk' plink
|
||||
@@ -48,7 +49,7 @@ if [[ "$os" == "GNU/Linux" ]]; then
|
||||
else
|
||||
BBBITS=32
|
||||
fi
|
||||
export BBTAG=$(/opt/bb/bin/robolibs-current-build --tag local --bits $BBBITS)
|
||||
export BBTAG=$(/opt/bb/bin/robolibs-current-build --tag trunk --bits $BBBITS)
|
||||
|
||||
getop() { # BOX
|
||||
if [[ $# -ne 1 ]]; then
|
||||
@@ -73,73 +74,14 @@ run() {
|
||||
fi
|
||||
}
|
||||
|
||||
sun() { # CMD
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: sun <command>"
|
||||
else
|
||||
run njtsdev3 $@
|
||||
fi
|
||||
use-blot-meta(){
|
||||
export DPKG_ARCH=$(/opt/bb/bin/dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
export DPKG_DISTRO_DIR=$HOME/bb/blot-meta/cmake-distro-dev/${DPKG_ARCH}
|
||||
}
|
||||
|
||||
ibm() { # CMD
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: ibm <command>"
|
||||
else
|
||||
run ibm3 $@
|
||||
fi
|
||||
}
|
||||
|
||||
git-repo-setup(){
|
||||
|
||||
if [[ $# -ne 0 ]]; then
|
||||
echo "Usage: just run inside a bbgithub repo."
|
||||
return
|
||||
fi
|
||||
|
||||
st=$(git status)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Looks this is not a git repo."
|
||||
return
|
||||
fi
|
||||
|
||||
us=$(git remote get-url upstream 2> /dev/null)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "Upstream already exist as $us."
|
||||
return
|
||||
fi
|
||||
|
||||
url=$(git remote get-url origin)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Origin URL is unknown."
|
||||
return
|
||||
fi
|
||||
|
||||
re="^(.*)[/:]([^/:]*)/(.*)$"
|
||||
if [[ $url =~ $re ]]; then
|
||||
prefix=${BASH_REMATCH[1]}
|
||||
org=${BASH_REMATCH[2]}
|
||||
repo=${BASH_REMATCH[3]}
|
||||
else
|
||||
echo "Failed to pars the repo URL."
|
||||
return
|
||||
fi
|
||||
|
||||
upstream_repo=bbgithub:$org/$repo
|
||||
origin_repo=bbgithub:vkhachatrya5/$repo
|
||||
|
||||
git remote rm origin
|
||||
echo "Setting origin=$origin_repo"
|
||||
git remote add origin $origin_repo
|
||||
echo "Setting upstream=$upstream_repo"
|
||||
git remote add upstream $upstream_repo
|
||||
git remote -v
|
||||
}
|
||||
|
||||
git-master-refresh(){
|
||||
git fetch upstream master
|
||||
git co upstream/master
|
||||
git br -D master
|
||||
git co -b master
|
||||
use-local-distro(){
|
||||
unset DPKG_ARCH
|
||||
unset DPKG_DISTRO_DIR
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user