Moved custom aliases in main plugin dirs and added a buildbot_dev for my own aliases

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
This commit is contained in:
Gaetan Semet 2013-06-05 15:26:09 +02:00
commit 037154b250
2 changed files with 86 additions and 2 deletions

View file

@ -0,0 +1,86 @@
alias cdb='cd ~/projects/buildbot/'
function bb_env()
{
BASE=$HOME/projects/buildbot/
#export __PATHBKP=$PATH
#export PYTHONPATH=$BASE/buildbot/master:$BASE/txwebservices/install:$BASE/cactus/install:$BASE/config/tools
#export PATH=$HOME/bin:$BASE/buildbot/master/bin:$BASE/txwebservices/install:$PATH
#export format_warnings_path=$BASE/config
#export warning_path=$BASE/config/latests_warnings
#export __PS1BKP=$PS1
fg_blue=%{$'\e[0;34m'%}
fg_cyan=%{$'\e[0;36m'%}
fg_lgreen=%{$'\e[1;32m'%}
# export PS1=${fg_lgreen}BBENV${fg_cyan}:$PS1
cd $BASE/config
. ../tosource
}
function bb_envrestore()
{
unset BASE
unset PYTHONPATH
unset warning_path
unset format_warnings_path
export PATH=$__PATHBKP
export PS1=$__PS1BKP
}
alias autopep8_cur_directory='autopep8 --ignore=E501 -i **/*.py'
function bb_repo_upload()
{
REVIEWERS=(ion.alberdi@intel.com\
vincentx.besanceney@intel.com\
vincentx.dardel@intel.com\
christophex.letessier@intel.com\
olivier.monnier@intel.com\
remy.protat@intel.com\
gaetan.semet@intel.com\
pierre.tardy@intel.com)
A=$(printf -- '%s,' ${REVIEWERS[@]})
A=${A%,}
echo "Reviewers: $A"
repo upload --cbr --re=$A .
}
function bb_merge_staging_main()
{
git merge umg/platform/buildbot/staging --m "Manual merge branch 'platform/buildbot/staging' into 'platform/buildbot/main'"
git mergetool --no-prompt --tool=kdiff3
}
function bb_merge_prod_staging()
{
git merge umg/platform/buildbot/prod --m "Manual merge branch 'platform/buildbot/prod' into 'platform/buildbot/staging'"
git mergetool --no-prompt --tool=kdiff3
}
function bb_push_with_care()
{
project=$1
shift
branch=$1
shift
if [[ -z $project || -z $branch ]]; then
echo "Missing arg : <project> <branch>"
return
fi
echo "Pushing branch $branch on project $project"
echo "Press Enter to continue"
read
git push ssh://android.intel.com/a/buildbot/$project HEAD:platform/buildbot/$branch
echo "Refreshing repo"
echo "Waitin 30s..."
sleep "30"
repo sync .
echo "Display merged:"
git log --pretty=oneline --graph -3 | cat
}

View file

@ -1,92 +0,0 @@
#Aliases
##ls, the common ones I use a lot shortened for rapid fire usage
alias ls='ls --color' #I like color
alias l='ls -lFh' #size,show type,human readable
alias la='ls -lAFh' #long list,show almost all,show type,human readable
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
alias ll='ls -l' #long list
alias ldot='ls -ld .*'
alias lS='ls -1FSsh'
alias lart='ls -1Fcart'
alias lrt='ls -1Fcrt'
alias zshrc='vim ~/.zshrc'
alias grep='grep --color'
alias sgrep='grep -R -n -H -C 5'
alias cdb='cd ~/projects/buildbot/'
alias t='tail -f'
# cd, because typing the backslash is A LOT of work!!
alias ..='cd ../'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
# Command line head / tail shortcuts
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
alias -g L="| less"
alias -g M="| most"
alias -g LL="2>&1 | less"
alias -g CA="2>&1 | cat -A"
alias -g NE="2> /dev/null"
alias -g NUL="> /dev/null 2>&1"
alias -g P="2>&1| pygmentize -l pytb"
alias dud='du --max-depth=1 -h'
alias duf='du -sh *'
alias fd='find . -type d -name'
alias ff='find . -type f -name'
alias h='history'
alias hgrep="fc -El 0 | grep"
alias help='man'
alias j='jobs'
alias p='ps -f'
alias sortnr='sort -n -r'
alias unexport='unset'
alias whereami=display_info
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# zsh is able to auto-do some kungfoo
# depends on the SUFFIX :)
if [ ${ZSH_VERSION//\./} -ge 420 ]; then
# open browser on urls
_browser_fts=(htm html de org net com at cx nl se dk dk php)
for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done
_editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex)
for ft in $_editor_fts ; do alias -s $ft=$EDITOR ; done
_image_fts=(jpg jpeg png gif mng tiff tif xpm)
for ft in $_image_fts ; do alias -s $ft=$XIVIEWER; done
_media_fts=(avi mpg mpeg ogm mp3 wav ogg ape rm mov mkv)
for ft in $_media_fts ; do alias -s $ft=mplayer ; done
#read documents
alias -s pdf=acroread
alias -s ps=gv
alias -s dvi=xdvi
alias -s chm=xchm
alias -s djvu=djview
#list whats inside packed file
alias -s zip="unzip -l"
alias -s rar="unrar l"
alias -s tar="tar tf"
alias -s tar.gz="echo "
alias -s ace="unace l"
fi
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'