forked from os-vector/wire-os-victor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetenv.sh
More file actions
32 lines (27 loc) · 1.49 KB
/
setenv.sh
File metadata and controls
32 lines (27 loc) · 1.49 KB
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
#!/usr/bin/env bash
export GIT_PROJ_ROOT="$(
cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 \
&& git rev-parse --show-toplevel
)"
alias victor_restart="cd ${GIT_PROJ_ROOT} && ${GIT_PROJ_ROOT}/project/victor/scripts/victor_restart.sh"
alias victor_start="cd ${GIT_PROJ_ROOT} && ${GIT_PROJ_ROOT}/project/victor/scripts/victor_start.sh"
alias victor_stop="cd ${GIT_PROJ_ROOT} && ${GIT_PROJ_ROOT}/project/victor/scripts/victor_stop.sh"
alias victor_stage="cd ${GIT_PROJ_ROOT} && ${GIT_PROJ_ROOT}/project/victor/scripts/stage.sh"
alias watch_backtraces="cd ${GIT_PROJ_ROOT} && echo Waiting for backtraces... && python3 project/victor/scripts/backtracewatcher.py"
alias victor_build_release="cd ${GIT_PROJ_ROOT} && ${GIT_PROJ_ROOT}/project/victor/scripts/victor_build_release.sh"
alias victor_deploy_run="cd ${GIT_PROJ_ROOT} && ${GIT_PROJ_ROOT}/project/victor/scripts/victor_deploy_run.sh"
function IS_ROBOT_IP_THERE() {
if [[ ! -f "$GIT_PROJ_ROOT/robot_ip.txt" ]]; then
echo "Robot IP file doesn't exist. What is your robot's IP?"
echo -n "(XXX.XXX.XXX.XXX): "
read ipaddr
echo "$ipaddr" > "$GIT_PROJ_ROOT/robot_ip.txt"
fi
}
alias vclean='rm -rf ${GIT_PROJ_ROOT}/_build ${GIT_PROJ_ROOT}/generated'
alias vbuild=victor_build_release
alias vdeploy='IS_ROBOT_IP_THERE; victor_deploy_run'
alias vbd='victor_build_release && victor_deploy_run'
alias stage='victor_stage'
alias see_size_of_silly_victor_build='victor_stage && du -sh _build/staging'
alias wbtrace='watch_backtraces'