local/bb/.bashrc.local
This commit is contained in:
@@ -17,7 +17,7 @@ export DEV_CPPINC=-I.
|
|||||||
export DEV_FINC=-I.
|
export DEV_FINC=-I.
|
||||||
|
|
||||||
#I need this to run distributor locally.
|
#I need this to run distributor locally.
|
||||||
export PGPASSFILE=$HOME/.fit_pgpass
|
export PGPASSFILE=$HOME/.pgpass
|
||||||
export PGSERVICEFILE=$HOME/.fit_pg_service.conf
|
export PGSERVICEFILE=$HOME/.fit_pg_service.conf
|
||||||
|
|
||||||
export SRC_DIR=$HOME/devel/src
|
export SRC_DIR=$HOME/devel/src
|
||||||
@@ -25,6 +25,7 @@ export BOOST_DIR=$SRC_DIR/boost
|
|||||||
#export TBB_DIR=$SRC_DIR/tbb
|
#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=$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 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'
|
alias bb='cd $HOME/devel/bb >/dev/null'
|
||||||
#complete -f -X '!*.mk' plink
|
#complete -f -X '!*.mk' plink
|
||||||
@@ -48,7 +49,7 @@ if [[ "$os" == "GNU/Linux" ]]; then
|
|||||||
else
|
else
|
||||||
BBBITS=32
|
BBBITS=32
|
||||||
fi
|
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
|
getop() { # BOX
|
||||||
if [[ $# -ne 1 ]]; then
|
if [[ $# -ne 1 ]]; then
|
||||||
@@ -73,73 +74,14 @@ run() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
sun() { # CMD
|
use-blot-meta(){
|
||||||
if [[ $# -ne 1 ]]; then
|
export DPKG_ARCH=$(/opt/bb/bin/dpkg-architecture -qDEB_BUILD_ARCH)
|
||||||
echo "Usage: sun <command>"
|
export DPKG_DISTRO_DIR=$HOME/bb/blot-meta/cmake-distro-dev/${DPKG_ARCH}
|
||||||
else
|
|
||||||
run njtsdev3 $@
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ibm() { # CMD
|
use-local-distro(){
|
||||||
if [[ $# -ne 1 ]]; then
|
unset DPKG_ARCH
|
||||||
echo "Usage: ibm <command>"
|
unset DPKG_DISTRO_DIR
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user