2023-07-22 14:46:26 +02:00
|
|
|
# Work directories
|
|
|
|
WORK="$HOME/Projects/Work"
|
|
|
|
UTIL="$HOME/Projects/Work/utility"
|
|
|
|
BPS="$HOME/Projects/Work/BPS"
|
|
|
|
PUB="$HOME/Projects/Work/publikator/"
|
|
|
|
AR="$HOME/Projects/Work/arriva_server/server"
|
|
|
|
KRD="$HOME/Projects/Work/robots/krd_syncer"
|
2023-07-28 15:56:52 +02:00
|
|
|
NEG="$HOME/Projects/Work/negocjator/"
|
2023-07-22 14:46:26 +02:00
|
|
|
|
|
|
|
# Workflow
|
2023-11-23 12:29:53 +01:00
|
|
|
alias work="cd $WORK"
|
2023-07-22 14:46:26 +02:00
|
|
|
alias util="cd $UTIL && make"
|
|
|
|
alias bps="cd $BPS && make"
|
|
|
|
alias pub="cd $PUB"
|
|
|
|
alias ar="cd $AR && make"
|
|
|
|
alias arr="ar"
|
|
|
|
alias krd="cd $KRD"
|
|
|
|
alias neg="cd $NEG"
|
2023-11-23 13:34:10 +01:00
|
|
|
|
|
|
|
alias activate_venv="[ -f .venv/bin/activate ] && source .venv/bin/activate"
|
|
|
|
alias display_makefile_help="[ -f Makefile ] && make"
|
|
|
|
|
|
|
|
# dynamic aliases
|
|
|
|
for d in $PUB/*; do
|
|
|
|
if [ -d "$d" ]; then
|
|
|
|
last_part=$(basename $d | tr "_" " " | awk '{print $NF}')
|
|
|
|
last_part=${last_part:0:1}
|
|
|
|
alias pub$last_part="cd $d && display_makefile_help && activate_venv"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
for d in $NEG/*; do
|
|
|
|
if [ -d "$d" ]; then
|
|
|
|
last_part=$(basename $d | tr "_" " " | awk '{print $NF}')
|
|
|
|
last_part=${last_part:0:1}
|
|
|
|
alias neg$last_part="cd $d && display_makefile_help && activate_venv"
|
|
|
|
fi
|
|
|
|
done
|