/
.bashrc-google-workstation
50 lines (43 loc) · 1.37 KB
/
.bashrc-google-workstation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
export TMUX_CMD="tmx2"
export SWARMING_SERVER="chromeos-swarming.appspot.com"
alias gogo='cd ${HOME}/chops_infra/infra/go && eval `./env.py` && cd src/infra/cros'
alias gorecipes='cd ${HOME}/chromiumos/infra/recipes'
# Repo/Git
alias rs="repo sync -j64"
alias ru.="repo upload --cbr ."
alias ruy="repo upload --cbr . --y"
alias gups="git branch --set-upstream-to m/master"
# Paths
TRUNK=$HOME/chromiumos
# Chroot overrides
if [ -f "/etc/cros_chroot_version" ]; then
. ${DOTFILES}/.bashrc-cros-sdk
fi
# Find a repo
find_repo() {
echo ${TRUNK}/$(grep -Rn $1 ${TRUNK}/manifest-internal/full.xml ${TRUNK}/manifest-internal/internal_full.xml | grep path | sed -E 's/.*path=\"([^"]+)\"/\1/') | cut -d " " -f1
}
goto_repo() {
if [[ $1 =~ ^\.?(dotfiles|df)$ ]]; then
cd $HOME/.dotfiles
elif [[ $1 =~ ^wk(spc)?$ ]]; then
cd $HOME/wkspc
else
cd $(find_repo $1)
fi
}
alias goto="goto_repo"
nvim-recipe-module() {
nvim -p term://bash recipe_modules/$1/*.py recipe_modules/$1/*/*.py
}
alias rg-recipes-real-code="rg -g '**.py' -g '!**/tests/**' -g '!**/examples/**'"
# Led aliases
led_edit_launch() {
led get-build $1 | led edit-recipe-bundle | led launch
}
led_relaunch_with_py3() {
led get-build $1 | led edit -experiment luci.recipes.use_python3=true | led launch
}
# Text-based adventure commands, lol
alias runto="goto"
alias where="pwd"